package cn.zxj.com;
public class Demo {
public static void main(String[] args) {
//统计质数个数
int count = 0;
for(int i = 2;i<=100;i++){
//排除1和自身的因数统计
int yzCount = 0;
for(int j = 1;j<=i-1;j++){
//排除因数1和自身
if(j!=1&&i!=j&&i%j==0){
yzCount++;
}
}
if(yzCount==0){
System.out.println(i);
count++;
}
}
System.out.println(count);
}
}