质数的判定
时间:2010-09-06 来源:kingfly8888
import java.lang.Math;
public class Prime {
public static void main(String args[]){
next:
for(int i=1;i<1000;i++){
for(int j=2;j<=Math.sqrt(i);j++){
if(i%j==0){
continue next;
}
}
System.out.println(i);
}
}
}
相关阅读 更多 +
排行榜 更多 +