#include <stdio.h>
#include <stdbool.h>
int main (void){
bool isPrime;
for (int p = 3; p <= 50; p += 2)
{
isPrime = true;
for (int d = 2; d < p; ++d && isPrime)
if (p % d == 0)
isPrime = false;
if (isPrime != false)
printf ("%i ", p);
}
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266587.html