Computer Science, asked by prateekpro5, 3 months ago

{
int
number,
count = 0;
Console.WriteLine("Enter any number");
number = Convert.ToInt32(Console.ReadLine());
for (int i = 1; i <= number; i + 1)
if (number % i == 0) count + 1;
if (count 2)
Console.WriteLine(number + * is prime");
else
Console.WriteLine(number + " is not prime");
O references​

Answers

Answered by vkrindstore
0

Explanation:

ToInt32(Console. ... int number, count = 0; Console.WriteLine("Enter any number"); ... if (number % i == 0) count + 1; if (count 2) ... WriteLine(number + " is not prime ");

Similar questions