- #include <iostream>
- using namespace std;
- int main()
- {
- int answer;
- cout<<"請問現在台灣第一任總統是誰?"<<endl;
- cout<<"(1)李登輝(2)莫那魯道(3)馬英九(4)勇者巴萊"<<endl;
- cout<<"請作答...";
- cin>>answer;
- cout<<endl;
- switch(answer)
- {
- case 1:
- cout<<"答對了!!";
- break;
- case 2:
- cout<<"是原住民ㄜ!!";
- break;
- case 3:
- cout<<"這是現在的總統!!";
- break;
- case 4:
- cout<<"還沉迷於新電影:賽德克巴萊ㄚ!!";
- break;
- default:
- cout<<"你來亂的喔!";
- }
- cout<<endl;
- system("pause");
- return 0;
- }
複製代碼 |