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

TOP

返回列表