java,php,asp.net,linux,javascript,mysql,mssql,oracle,编程

35选7彩票程序

转载请注明:http://www.pmjava.com/Article/ShowInfo.asp?ID=56583
public class caipiao
{
  static void generate()
  {
    int a[]=new int[7];
    int i,m,j;
    fan:for(j=0;j <7;j++){//外循环实现随机生成每组7个数
    a[j]=(int)(Math.random()*35+1);
        m=a[j];
        if(j>=1){
            for(i=0;i               if(a[i]==m){
              j--;
              continue fan;
                }
        }
        if(a[j] <10)
            System.out.print("0"+a[j]+"  ");
            else
            System.out.print(a[j]+"  ");
      }
    }
public static void main (String args[]){
int n=Integer.parseInt(args[0]);
System.out.println("中国福利彩票35选7");
for(int i=0;i generate();
System.out.println();
  }
}
}                                                                  
 

posted on 2009-06-10 21:25 rrong_m 阅读(1710) 评论(0)  编辑  收藏

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

导航

统计

常用链接

随笔档案

文章分类

文章档案

java编程

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜