代码:
#include <stdio.h>
int main()
{
int x;
int i=2;
int b=1;
for(x=1;x<=100;x++)
{
b=1;
for(i=2;i<x;i++)
{
if(x%i==0)
{
b=0;
break;
}
}
if(b==1)
{
printf("%d ",x);
}
}
return 0;
}
标签:return,以内,x%,break,int,素数,printf,100,main From: https://blog.51cto.com/u_15652430/5732866