返回列表 發帖
  1. int main()
  2. {
  3.     int a;
  4.     cout<<"請輸入你的年齡: ";
  5.     cin>>a;
  6.     if(a<3)
  7.     {
  8.         cout<<"免費入場"<<endl;
  9.     }else if(4 <= a && a <= 12)
  10.     {
  11.         cout<<"兒童票:50元"<<endl;  
  12.     }else if(4 <= a && a <= 12)
  13.     {
  14.         cout<<" 一般票:100元"<<endl;
  15.     }else
  16.     {
  17.         cout<<"敬老票:70元"<<endl;
  18.     }
  19.     system("pause");
  20.     return 0;   
  21. }                                         
複製代碼

TOP

返回列表