Home > Back-end >  To determine whether the input integer primes!!!!! Where there is a wrong, please consult!!!!!!
To determine whether the input integer primes!!!!! Where there is a wrong, please consult!!!!!!

Time:03-16

# include "stdio.h"
Int nu (int a);
The main ()
{
Int c;
Printf (" input a number: ");
The scanf (" % d ", & amp; C);
If (nu (c))
Printf (" is a prime number ");
The else
Printf (" is not a prime number ");
}
Int nu (int a)
{int I;
for(i=1; iIf (a % I==0)
return 0;
return 1;
}

CodePudding user response:

I since 2 is right,
  • Related