boolean a = true; for (int i = 2; i < 100; i++) { a = true; //要把a的值还原 System.out.print(i + "是不是质数:"); for (int j = 2; j < i; j++) { if (i % j == 0) { a = false; break; } } System.out.println(a); }
哪儿显示有问题