int determine(int x)
{
int i = 1;
for (i = 2; i < x; i++)
{
if (x % i == 0)
{
printf("非素数\n");
break;
}
}
if (i == x)
printf("素数\n");
return 0;
}
int main()
{
int a = 0;
scanf("%d", &a);
determine(a);
return 0;
}
标签:return,int,自制,++,素数,determine,printf From: https://blog.51cto.com/u_16220477/7149188