java学习笔记二(1000以内的所有素数))

package com0708;

public class Text1 {
public static void main(String[] args) {
// boolean isLarg = true;
lags:for (int i = 2; i < 1000; i++) {
for (int j = 2; j < i; j++) {
if (i % j == 0) {
continue lags;
}
}
// if (isLarg == true) {
System.out.println(i);
// }
// isLarg = true;
}
}
}
posted @ 2021-07-09 13:37  JAVVA小拉拉  阅读(380)  评论(0)    收藏  举报