#include
#include
int main()
{
int i,k,m;
int n=0;
scanf("%d",m);
k=sqrt(m)+0.01;
for(i=2;i<k;i++)
{if(m%i==0)
printf("This is not a prime");
break;
if(i==k+1)
printf("This is a prime");
}
return 0;
}
我这个错在哪
#include
#include
int main()
{
int i,k,m;
int n=0;
scanf("%d",m);
k=sqrt(m)+0.01;
for(i=2;i<k;i++)
if(m%i==0)
printf("This is not a prime");
break;
if(i==k+1)
printf("This is a prime");
return 0;
}