inline bool isPrime(const int &n)
{
if (n > 0 && n != 1)
{
int temp = sqrt(n);
for (int i = 2; i <= temp; i++)
{
if (n % i == 0 && n != 2)
return false;
}
return true;
}
else
return false;
}
标签:判断,const,temp,int,sqrt,素数,bool
From: https://www.cnblogs.com/TNTksals/p/16728575.html