the Main void static ()
{
int n-;
int SUM = 0;
Console.Write ( "Enter a number:");
n-= the int.Parse (Console.ReadLine ());
for (int I =. 1; I <= n-; I ++)
{
IF (n-I% == 0)
{
SUM + =. 1;
}
}
IF (SUM == 2)
{
Console.WriteLine ( "the result is not a prime number");
}
the else
{
Console.WriteLine ( "result prime ");
}
A simple code // find a prime number
Guess you like
Origin www.cnblogs.com/zxl934734463/p/10966613.html
Ranking