返回列表 發帖
本帖最後由 謝瀞儀 於 2014-8-30 12:05 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int s;
  7.     cout<<"輸入分數:"<<endl;
  8.     cin>>s;
  9.     if (s==100)
  10.         cout<<"哇!滿分!"<<endl;
  11.     else if (s>=70 && s<80)
  12.         cout<<"甘巴爹!加油!"<<endl;
  13.     else if (s>=80 && s<90)
  14.         cout<<"甘巴爹!!快90了!"<<endl;
  15.     else if (s>=90 && s<100)
  16.         cout<<"甘巴爹!甘巴爹!到100更好!"<<endl;
  17.     else if (s>=60 && s<70)
  18.         cout<<"恭喜你及格了!"<<endl;
  19.     else if (s>0 && s<60)
  20.         cout<<"不及格!請再努力!"<<endl;
  21.     else if (s==0)
  22.         cout<<"!?給本宮拖出去斬了!"<<endl;
  23.     else
  24.         cout<<"輸入錯誤?給本宮拖出去斬了!"<<endl;
  25.     system ("pause");
  26.     return 0;
  27. }
複製代碼

TOP

返回列表