- import java.util.Scanner;
- public class Ch13 {
- public static void main(String[] args) {
- Scanner S=new Scanner(System.in);
- int answer;
- System.out.println("中夭問答");
- System.out.println("如何發大財?(1)請迪士尼(2)蓋摩天輪(3)抱中共大腿(4)當個鋼鐵含粉");
- System.out.print("請回答!!!");
- answer=S.nextInt();
- switch(answer)
- {
- case 1:
- System.out.println("不可能傻B");
- break;
- case 2:
- System.out.println("中央沒經費");
- break;
- case 3:
- System.out.println("館長不開心");
- break;
- case 4:
- System.out.println("凍不了阿ㄚㄚㄚㄚㄚ!");
- break;
- default:
- System.out.println("輸入錯誤!");
- }
-
- }
- }
複製代碼 |