int number;
Console.Write("Enter a number: ");
number = int.Parse(Console.ReadLine());
int ctr = 2;
while(ctr <= number)
{
if(number % ctr == 0)
break;
ctr++;
}
if(ctr == number)
Console.WriteLine("Prime");
else
Console.WriteLine("Not Prime");
Console.ReadKey();