一百以内的质数
作者:互联网
public class test {
public static void main(String[] args) {
for (int i = 1; i <= 100; i++) {
int k=0;
for (int j = 1; j <=i; j++) {
if (i % j == 0){
k++;
}
}
if (k == 2){
System.out.println(i);
}
}
}
}
标签:String,以内,质数,args,System,int,一百,public 来源: https://blog.csdn.net/root193/article/details/113929136