#include<stdio.h>
int main()
{
int i;
int a;
int n;
for(i=0;i<n;i++)
{scanf("%d",&n);
for(a=2;a<=n/2;a++)
if(n%a==0)
break;
if(a>n/2&&n!=1)
printf("%d is a prime.\n",n);
else printf("%d not a prime.\n",n);}
return 0;
}
我这么打哪里错了呢
晚安sp
相关分类