#include
#include
#include
main()
{
int i, j, n = 0;
system("cls");
for (i = 100; i <= 200; i++)
for (j = 2; j <= sqrt(i); j++)
if (i % j == 0)
break;
else
if (j > sqrt(i) - 1)
{
printf("%d,", i);
n++;
if (n % 5 == 0)
printf("\n");
}
else
continue;
printf("\n");
return 0;
}
i=101
sqrt(i)=10.04987562112089
sqrt(i)-1=9.04987562112089
j=10>sqrt(i)-1=9.04987562112089應該會輸出