yuedan628
 1 package com.lovo;
 2 
 3 import java.util.Scanner;
 4 
 5 /**
 6  * 七星彩随机选号程序
 7  * 
 8  *
 9  */
10 public class Test05 {
11 
12     public static void main(String[] args) {
13         Scanner sc = new Scanner(System.in);
14         System.out.print("机选几注: ");
15         if(sc.hasNextInt()) {
16             int n = sc.nextInt();
17             if(n > 0) {
18                 for(int i = 1; i <= n; i++) {
19                     for(int j = 1; j <= 7; j++) {
20                         System.out.print((int)(Math.random() * 10) + " ");
21                     }
22                     System.out.println();
23                 }
24             }
25         }
26         sc.close();
27     }
28 }

 

分类:

技术点:

相关文章: