本帖最後由 徐啟祐 於 2022-8-29 17:23 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main(){
- int feet;
- cout<<"<米哥的奇特問答>"<<endl;
- cout<<"請問豬有幾隻腳? <1>一隻<2>'兩隻<3>三隻<4>四隻"<<endl;
- cin>>feet;
- switch(feet){
- 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;
- }
複製代碼 |