zoukankan      html  css  js  c++  java
  • 100以内的素数

    public class test

                public static void main(String[] args)

               {  

                        int i,n,k=0;     

                        for (n = 3; n<=100; n++)

                        {        i=2;         

                                while (i<n)

                               {   if (n%i==0)  break;     i++;           }
                               if (i==n)

                              {    

                                 k++;   System.out.print(i+ " ");   

                                 if (k %6==0)  System.out.println();     

                              }  

                        }

             }

    }

  • 相关阅读:
    Use HTTPS instead of HTTP
    Disable SSLv3
    JIRA Installation
    排序算法之简单选择排序
    排序算法之冒泡排序
    三本优秀的Python教程
    ubuntu*set*up
    程序员的十层楼(转载)
    drools spring config的问题
    MySQL Performance Tuning
  • 原文地址:https://www.cnblogs.com/JW-puppy/p/6593885.html
Copyright © 2011-2022 走看看