返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {   
  6.     int score;
  7.     cout<<"請輸入你的成績: ";
  8.     cin>>score;
  9.     switch (score)
  10.     {
  11.     case  80...100:
  12.     cout<<"甲等"<<endl;
  13.     break;
  14.     case  79...70:
  15.     cout<<"乙等"<<endl;
  16.     break;
  17.     case  69...60:
  18.     cout<<"丙等"<<endl;
  19.     break;
  20.     default:
  21.     cout<<"輸出入錯誤"<<endl;
  22.     break;
  23.     system("pause");
  24.     return 0;   
  25. }
複製代碼

TOP

返回列表