📄 chance.java
字号:
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("请选择玩法: 1、21选5 2、6+1 ");
y=InputData.iRead();
if(y==1){
//实现第一个游戏
System.out.print("你的选择是:");
System.out.println("1、21选5 ");
game1.game();
}
else if(y==2){
//实现第二个游戏
System.out.print("你的选择是:");
System.out.println("2、6+1 ");
game2.game();
}
else
System.exit(0);
System.out.println("还想买彩票么? y/n");
}while(like!='n');
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -