bool prime(int x)
{
if(x==1)return false;
for(int i=2;i<=x/i;i++)
{
if(x%i==0)return false;
}
return true;
}
转载于:https://www.cnblogs.com/nlyzl/p/11262498.html
bool prime(int x)
{
if(x==1)return false;
for(int i=2;i<=x/i;i++)
{
if(x%i==0)return false;
}
return true;
}
转载于:https://www.cnblogs.com/nlyzl/p/11262498.html