返回列表 發帖
  1. #include<iostream>
  2. using namespace std ;
  3. int main()
  4. {
  5.    int score;
  6.    cout<<"請輸入成績";
  7.    cin>>score;
  8.    if(score==100)
  9.    {
  10.       cout<<"哇!100分耶!你太厲害了!";
  11.     }else if(score>=60 && score<100)
  12.     {
  13.       cout<<"恭喜妳!及格了!";
  14.       
  15.     }else if(score>0 && score<60)
  16.     {
  17.       cout<<"不及格!下次在努力!";
  18.     }else if(score==0)

  19.     {
  20.       cout<<"什麼!0分!你你....(氣到說不出話來)";
  21.     }else
  22.     {
  23.      cout<<"輸入錯誤,請不要亂打!";
  24.     }
  25.     system("pause");
  26.      return 0;
  27. }
複製代碼

TOP

本帖最後由 t2364705 於 2011-9-24 17:17 編輯
  1. int main()
  2. {
  3.     int score;
  4.     cout<<"請輸入成績";
  5.     cin>>score;
  6.     if(score==100)
  7.    
  8.     {
  9.         cout<<"恭喜你得到優等!";
  10.     }else if(score>=80 && score<100)
  11.    
  12.     {
  13.          cout<<"恭喜你得到甲等!";
  14.     } else if(score>=70 && score<80)
  15.     {
  16.           cout<<"你得到乙等!";
  17.     }else if(score>=60 && score<70)
  18.     {
  19.           cout<<"你得到丙等!";
  20.    
  21.     }else
  22.     {
  23.           cout<<"太差了!只得到了丁等!";
  24.     }
  25.    

  26.     system("pause");
  27.      return 0;
  28. }
複製代碼

TOP

  1. #include<iostream>
  2. using namespace std ;
  3. int main()
  4. {
  5.     int score;
  6.     cout<<"請輸入打字成績";
  7.     cin>>score;
  8.     if(score>=70)
  9.    
  10.     {
  11.         cout<<"恭喜你得到專業級!";
  12.     }else if(score>=50 && score<70)
  13.    
  14.     {
  15.          cout<<"你得到進階級!";
  16.     } else if(score>=30 && score<50)
  17.     {
  18.           cout<<"你得到實用級!";
  19.     }else
  20.     {
  21.           cout<<"太差了!你沒有通過!";
  22.     }
  23.    

  24.     system("pause");
  25.      return 0;
  26. }
複製代碼

TOP

返回列表