弄出来了
class ForumDemo {
public static void main(String[] args) {
int count = 0;
a:for(int i = 101; i <= 200; i++) {
for (int j = 2; j <i/2 ;j++ ) {
if ((i % j) == 0) {
continue a ;
}
}
count++;
System.out.print(i + " ");
}
System.out.println("-------------------------");
System.out.println(count);
}
} |