本帖最後由 羅紹齊 於 2022-9-3 13:57 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main(){
- int option;
- cout<<"小米的腦殘問題"<<endl;
- cout<<"豬有幾隻腳?"<<endl;
- cout<<"1(1隻)"<<endl;
- cout<<"2(2隻)"<<endl;
- cout<<"3(3隻)"<<endl;
- cout<<"4(4隻)"<<endl;
- cin>>option;
- switch(option){
- case 1:
- cout<<"傻眼"<<endl;
- break;
- case 2:
- cout<<"我是問豬不是問人!"<<endl;
- break;
- case 3:
- cout<<"另一隻腳是被你吃了吧!"<<endl;
- break;
- case 4:
- cout<<"Bingo!"<<endl;
- break;
- default:
- cout<<"好阿你就繼續搞事情阿!"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |