- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int score;
- int level;
-
- cout<<"請輸入您的分數:";
- cin>>score;
- level=score / 10;
-
- cout<<"您的評等是:";
- switch(level)
- {
- case 10:
- case 9:
- cout<<"A"<<endl;
- break;
-
- case 8:
- cout<<"B"<<endl;
- break;
-
- case 7:
- cout<<"C"<<endl;
- break;
-
- case 6:
- cout<<"D"<<endl;
- break;
-
- default:
- cout<<"E"<<endl;
- break;
- }
-
- if(level<6)
- {
- cout<<"哈哈你好爛"<<endl;
- }
- if(level==10)
- {
- cout<<"你是作弊嗎"<<endl;
- }
- if(level==9)
- {
- cout<<"你是作弊嗎"<<endl;
- }
- if(level==0)
- {
- cout<<"你還是人嗎,哪有人笨成這樣"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |