本帖最後由 尤爾呈 於 2019-8-12 20:45 編輯
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
re:
int age;
cout<<"請輸入你的年齡"<<endl;
else if (age>=0&&age>=3)
cout<<"幼兒票免費入場"<<endl;
else if (age>=4&&age>=12)
cout<<"兒童票50元入場"<<endl;
else if (age>=13&&age>=64)
cout<<"一般票100元入場"<<endl;
else if (age>=65&&age>=100)
cout<<"敬老票70元入場"<<endl;
else
cout<<"別鬧了!!!"<<endl;
goto re;
system("pause");
return 0;
} |