返回列表 發帖
  1. #include<iostream>
  2. using namespace std ;
  3. int main()
  4. {
  5.     int age;
  6.     cout<<"請問您幾年級?";
  7.     cin>>age;
  8.     if(age >= 1 && age<3)
  9.     {
  10.        cout<<"你是低年級";
  11.     }else if(age >= 3 && age<5)
  12.     {
  13.        cout<<"你是中年級";
  14.     }else if(age >= 5 && age<=6)
  15.     {
  16.        cout<<"你是高年級";  
  17.     }
  18.     system("pause");
  19.     return 0 ;
  20. }
複製代碼

TOP

返回列表