#include <stdio.h>
int main() {
int loop, number;
int prime = 1;
number = 11;
for(loop = 2; loop < number; loop++) {
if((number % loop) == 0) {
prime = 0;
}
}
if (prime == 1)
printf("%d is prime number.", number);
else
printf("%d is not a prime number.", number);
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265364.html