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
素数
最新推荐文章于 2024-08-19 16:48:28 发布