(2)- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main ()
- {
- while (true)
- {
-
-
- int a=0;
-
- cout<<"請問李白屬於哪一個朝代?"<<endl;
- cout<<"(1)鄭氏王朝,(2)唐朝,(3)漢朝,(4)中華民國朝"<<endl;
- cout<<"答:";
- cin>>a;
-
- switch(a){
- case 4:
- cout<<"你又看過李白了?"<<endl;
- break;
- case 3:
- cout<<"三國演義看多了吧~(書呆子)"<<endl;
- break;
- case 2:
- cout<<"你好棒棒!"<<endl;
- break;
- case 1:
- cout<<"李白知道鄭成功?"<<endl;
- break;
-
-
- default:
- cout<<"輸入錯誤XXXXX010101010101010xoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo開啟時光機"<<endl;
- cout<<"不明人士:嗨!我是李白!看這月亮那麼圓,陪我喝杯酒ㄅ"<<endl;
- cout<<"原來李白屬於中華民國朝OMG........."<<endl;
-
- break;
- }
-
-
-
- system ("pause");
- }
- return 0;
- }
複製代碼 |