第1个回答 2018-05-18
public class Su {
public static void main(String[] args) {
int su = 0;
int count = 0;
for (int i = 101; i < 201; i += 2) {
if (isSu(i)) {
su = i;
System.out.println(su);
count++;
}
}
System.out.println(count++);
}
public static boolean isSu(int i){
for (int j = 2; j <= i / 2; j++) {
if (i % j == 0) {
return false;
}
}
return true;
}
}