- cout<<"<小米的腦殘問題>"<<endl;
- cout<<"豬有幾隻腳? 1.一隻2.兩隻3.三隻4.四點五隻5.以上皆非"<<endl;
- cin>>
-
-
- switch (score){
- case 90 ... 100:
- cout<<"優等"<<endl;
- break;
-
-
- case 2:
- case 80 ... 89:
- cout<<"甲等"<<endl;
- break;
-
- case 3:
- cout<<"三隻"<<endl;
- break;
- case 4:
- cout<<"四點五隻"<<endl;
- break;
- case 4:
- cout<<"以上皆非"<<endl;
- break;
-
- default:
- cout<<"輸入錯誤"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |