Prime numbers c++

Hi!
I need to create a program that would request person to type one number and than print if it's a prime number or not.
I have no idea how to start this.
Okay, reply back with a list of things that a prime number must follow, for it to be considered a prime number.
#include<iostream>
main()
{
int num,i;
cout<<"Enter the any no.=";
cin>>num;
for(i=2;i<=num;i++)
{
if(num%i==0)
{
break;
}
}
if(i==num)
{
cout<<"The number entered is a PRIME no.";
}
else
{
cout<<"The number entered is NOT a PRIME no.";
}

}
You shouldn't hand people answers if they haven't written any code themselves, and please use [code][/code] tags, the <> picture to the right of the reply box.
Topic archived. No new replies allowed.