#include
int main()
{int i=2,j,s=0;
while(i<100)
{j=2;
while(j*j<=i)
{if(i%j==0)break;
j++;
}
if(j*j>i)s+=i;
i++;
}
printf("100以内素数的和=%d\n",s);
return 0;
}
#include
int main()
{int i=2,j,s=0;
while(i<100)
{j=2;
while(j*j<=i)
{if(i%j==0)break;
j++;
}
if(j*j>i)s+=i;
i++;
}
printf("100以内素数的和=%d\n",s);
return 0;
}