#include <stdio.h>
int main(int argc, const char *argv[])
{
int i,j;
int num = 0; //循环累加计数
//从1到100,做被除数
for (i = 1; i <= 100; i++){
//从1到i本身,做除数
for(j = 1; j <= i; j++){
//判断能否整除
if((i%j) == 0){
num++;
continue;
}
}
//当num为2时,说明只有1和它本身满足条件
if(num == 2){
printf("%-3d", i);
}
//下次循环开始时初始化num
num = 0;
}
//换行,好看点
putchar(10);
return 0;
}