赞
踩
public class Susu { public static void main(String args[]) { System.out.println("3--100deshushuyou: "); boolean isprime; int iCount=0; for(int i=3;i<=100;i++) { isprime =true; for(int j=2;j<=i/2;j++) { if(i%j==0) { isprime=false; break; }///end of if }end of for j if(isprime) { System.out.print(i+"\t"); iCount++; if(iCount%6==0) System.out.println(); }///end of if }//end of for i }//end of main }// end of class
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。