- #include<iostream>
- using namespace std;
- int main()
- {
- int answer;
- cout<<"猜猜看岳凌幾公斤重?"<<endl;
- cout<<"(1)100公斤 (2)10公斤 (3)50公斤 (4)32公斤"<<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<<"輸入錯誤!!!笨笨!"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |