返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.         int x;
  7.         cout<<"輸入您年齡:"<<endl;
  8.         cin>>x;
  9.         if(x=>1&&x<=3)
  10.         {
  11.             cout<<"幼兒票,免費入場"<<endl;
  12.     }
  13.         else if(x=>4&&x<=12)
  14.     {
  15.             cout<<"兒童票,50元"<<endl;
  16.     }
  17.     else if(x=>64&&x<=13)
  18.     {
  19.             cout<<"一般票,100元"<<endl;
  20.     }
  21.     else if(x=>65)
  22.     {
  23.             cout<<"敬老票,70元"<<endl;
  24.     }
  25.     system("pause");
  26.     return 0;   
  27. }
複製代碼

TOP

返回列表