- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- char ans;
- cout << "超智障問答" <<endl;
- cout << "請問水是甚麼顏色?" ;
- cout << "(a)黃色 (b)紅色 (c)透明 (d)紫色" << endl;
- cout << "請作答:" ;
- cin >> ans ;
-
- switch(ans)
- {
- case 'a':
- cout<<"去測一下你的智商吧!";
- break;
- case 'b':
- cout<<"犯案現場請勿靠近!";
- break;
- case 'c':
- cout<<"你的智商180!";
- break;
- case 'd':
- cout<<"你喝水溝的水嗎?";
- break;
- default:
- cout<<"別亂打!";
- }
- cout<<endl;
- system("pause");
- return 0;
- }
複製代碼 |