豆腐干
#include<stdio.h>#include<math.h>
void main()
{
long prime(long x);
long m,t;
scanf("%ld",&m);
t=prime(m);
if(t>sqrt(m))
printf("%ld is a prime number\n",m);
else printf("%ld is not a prime number\n",m);
}
long prime(long x)
{
long i;
for(i=2;i<=sqrt(x);i++)
if(x%i==0) break;
return(i);
}