public class prime {
public static void main(String[] args) {
int j;
for (int i = 2; i <= 100; i++) {
j = 2;
while (i % j != 0)
j++;
if (j == i)
System.out.println(i);
}
}
}
1...100之间质数
猜你喜欢
转载自blog.csdn.net/weixin_43203897/article/details/84336196
今日推荐
周排行