#include <stdio.h>
#include <math.h>
int is_su_shu(int);
int main(int argc,char *argv[])
{
int i,count=0;
int int_is_sushu;
for(i=101;i<=200;i++)
{
int_is_sushu = is_su_shu(i);
if (int_is_sushu > 0)
{
count ++;
}
}
printf("the sushu count is :%d\n",count);
system("pause");
return 0;
}
int is_su_shu(int count)
{
int int_return=0,int_sqrt;
int i;
int_sqrt = sqrt(count);
for (i=2;i<= int_sqrt;i++)
{
if (count % i == 0)
{
int_return = 1;
break;
}
}
return int_return;
}
|