public static void main(String[] args) {
int count = 0;
for (int i = 2; i < 101; i++) {
for (int j = 2; j <= i; j++) {
if (i % j == 0 && i != j)
break;
if (j == i) {
if (count % 5 == 0)
System.out.println();
System.out.print(j + " ");
count++;
}
}
}
System.out.println("
素数有" + count + "个");
}