You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
435 B

int main()
{
int i = 2;
int j;
int sign;
int num=0;
while(i < 101)
{
sign = 0;
j = 2;
while( j < i )
{
if((i % j) == 0)
{
sign = 1;
break;
}
j = j + 1;
}
if(sign == 0)
{
putint(i);
num = num + 1;
}
i = i + 1;
}
return num;
}