>>4
これ使え。
int isprime(int n) {
int x;
for (x = 2; x * x <= n; x++)
if (n % x) return 0;
return 1;
}
何度書いたんだろう、この関数。