體育彩票隨機生成程序

import java.util.*;
public class Lottery {
    public static void main ( String[ ] args ){
         String strChoose = "0";
       do{
       int i = 0 , nNum=0;
        for ( i = 0 ; i < 7 ; i++ ) {
           nNum = (int) (Math.random( ) * 10);
             System.out.print ( nNum );
        }
               System.out.print ("是否繼續 y/n :" );
               strChoose = input.next ( );
         }while( strChoose.equals ("y") );
     }
}                   
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章