返回列表 發帖
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     bool  isStart=true;
  7.     while(isStart)
  8.     {
  9.     int score;
  10.     cin>>score;
  11.     cout<<"超過999結束"<<endl;
  12.     if(score==999)
  13.     {
  14.     isStart=false;
  15.       cout<<"結束"<<endl;            
  16.     }
  17.     else
  18.     {
  19.    
  20.     if(score>=91 && score<=100)
  21.     {
  22.       cout<<"優等"<<endl;            
  23.     }
  24.     if(score>=80 && score<90)
  25.     {
  26.       cout<<"甲等"<<endl;            
  27.     }
  28.     if(score>=70 && score<81)
  29.     {
  30.       cout<<"乙等"<<endl;            
  31.     }
  32.     if(score>=60 && score<79)
  33.     {
  34.       cout<<"丙等"<<endl;            
  35.     }
  36.     if(score>=0 && score<59)
  37.     {
  38.       cout<<"不及格"<<endl;            
  39.     }
  40.     }
  41.     }
  42.     system("pause");
  43.      return 0;     
  44. }
複製代碼

TOP

返回列表