- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- char answer;
- cout<<"<腦殘問答>"<<endl;
- cout<<"請問你有幾隻手? (a)1隻 (b)5隻 (c)2隻 (d)9隻"<<endl;
- cin>>answer;
- switch(answer)
- {
- case 'a':
- case 'A':
- cout<<"笨蛋";
- break;
- case 'b':
- cout<<"笨蛋";
- break;
- case 'c':
- cout<<"答對了!阿不就好棒棒?";
- break;
- case 'd':
- cout<<"笨蛋";
- break;
- default:
- cout<<"Error";
- }
-
- system("pause");
- return 0;
- }
複製代碼 |