- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int answer;
- cout <<"<???>"<<endl;
- cout <<"你晚上吃什麼? (1)垃圾 (2)鋼鐵 (3)我 (4)沒有吃東西"<<endl;
- cout <<"請作答:";
- cin >> answer;
- switch(answer)
- {
- case 1:
- cout <<"你是流浪漢嗎?"<<endl;
- break ;
- case 2:
- cout <<"嗨!鋼鐵人"<<endl;
- break ;
- case 3:
- cout <<"回家吃自己!"<<endl;
- break ;
- case 4:
- cout <<"你失憶了,走!去看醫生."<<endl;
- break ;
- default:
- cout <<"不會數數嗎,只有4而已!!"<<endl;
-
- }
- system("pause");
- return 0;
- }
複製代碼 |