int n;
scanf(“%d”,&n);
for(int i =0;i<n;i)
{
int num;
scanf(“%d”,&num);
int is_prime =1;
for(int j=2;j*j<=num;j)//注意j*j<=num
{
if(num%j==0)
{
is_prime = 0;
break;
}
}
if(is_prime ==0)printf(“%d is not prime\n”,num);
else printf(“%d is prime\n”,num);
}
return 0;