?? chance.java
字號(hào):
import java.io.*;
import mypg.InputData;
public class chance {
public static void main (String args[])throws IOException{
char like;
int y;
Game1 game1= new Game1();
Game2 game2= new Game2();
System.out.println("想買彩票么? y/n");
do{
like=(char)System.in.read();
if(like=='n')
System.exit(0);
System.out.println("請(qǐng)選擇玩法: 1、21選5 2、6+1 ");
y=InputData.iRead();
if(y==1){
//實(shí)現(xiàn)第一個(gè)游戲
System.out.print("你的選擇是:");
System.out.println("1、21選5 ");
game1.game();
}
else if(y==2){
//實(shí)現(xiàn)第二個(gè)游戲
System.out.print("你的選擇是:");
System.out.println("2、6+1 ");
game2.game();
}
else
System.exit(0);
System.out.println("還想買彩票么? y/n");
}while(like!='n');
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -