谁帮我注释下,要详细的,谢谢大家!!
//file name:zhishu.java //输出区间的所有质数import java.util.*;
public class zhishu
{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("输入数的上限跟下限:");
int min = in.nextInt();
int max = in.nextInt();
boolean f = true;
if(min%2==0)
{
for(int i=min+1;i<max;i+=2) {
for(int j=2;j<i;j++){
if(i%j == 0){
f = false;
break;
}
}
if(!f){
f = true;
continue;
}
System.out.println(i);
}
}
else
{
for(int i=min;i<max;i+=2) {
for(int j=2;j<i;j++) {
if(i%j == 0) {
f = false;
break;
}
}
if(!f) {
f = true;
continue;
}
System.out.println(i);
}
}
}
}