Android开发,java开发程序员常见面试题,求100-200之间的质数,java逻辑代码

时间:2023-12-04 23:51:44
public class aa{
public static void main (String args []){
//author:qq986945193
for (int i = 100;i<201;i++){
boolean flag = true;
for (int j = 2;j<i-1;j++){
if(i%j==0){
flag = false;
}
}
if(flag){
System.out.println(i);
}
}
}
}

java源代码下载地址:http://download.csdn.net/detail/qq_21376985/9486166