publicclass求质数 {publicstaticvoidmain(String[] args){for(inti =2; i <100; i++) {inttemp =0;for(intj =2; j < i; j++) {if(i % j ==0) { temp =1; } }if(temp !=1) { System.out.println(i); } } } }
publicclass求质数 {publicstaticvoidmain(String[] args){for(inti =2; i <100; i++) {inttemp =0;for(intj =2; j < i; j++) {if(i % j ==0) { temp =1; } }if(temp !=1) { System.out.println(i); } } } }