会计考友 发表于 2012-8-4 12:33:16

2012JAVA模拟试题及答案:编程题27

【程序27】   
题目:求100之内的素数   
//使用除sqrt(n)的方法求出的素数不包括2和3
public class lianxi27 {
public static void main(String[] args) {
    boolean b =false;
    System.out.print(2 + " ");
    System.out.print(3 + " ");
    for(int i=3; i
页: [1]
查看完整版本: 2012JAVA模拟试题及答案:编程题27