返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int score=0;
  7.    
  8.     cout<<"請輸入你的成績:"<<endl;
  9.     cin >> score;
  10.      if(score >= 60 && score <=100)
  11.     {
  12.       cout << "及格" << endl;   
  13.     }
  14.     else if(score >=0 && score <60)
  15.     {
  16.          cout << "不及格" << endl;
  17.     }
  18.     else
  19.     {
  20.       cout << "輸入錯誤" << endl;   
  21.     }
  22.     system("pause");
  23.     return 0;
  24. }
複製代碼

TOP

返回列表