给出一个数,判断这个数是不是素数:
bool isPrime(int n) { int i; for (i = 2; i <= sqrt(n); i++) { if (n % i == 0) return false; } return true;}