// 机票预定:根据用户的输入,输出实际机票价格。
//原价为4000元,5-10月为旺季,头等舱打9折,
//经济舱打7.5折,其他时间为淡季,头等舱打6折,经济舱打3折
int price = 4000;
int month = 0;
bool result =false;
Console.WriteLine("请输入月份");
do
try
{
int s = int.Parse(Console.ReadLine());
month = s;
result = true;
break;
}
catch (Exception e)
{
Console.WriteLine("输入正确的月份有问题\n"+"错误原因是"+e);
}
while (true);
if (0 >= month || month > 12)
//原价为4000元,5-10月为旺季,头等舱打9折,
//经济舱打7.5折,其他时间为淡季,头等舱打6折,经济舱打3折
int price = 4000;
int month = 0;
bool result =false;
Console.WriteLine("请输入月份");
do
try
{
int s = int.Parse(Console.ReadLine());
month = s;
result = true;
break;
}
catch (Exception e)
{
Console.WriteLine("输入正确的月份有问题\n"+"错误原因是"+e);
}
while (true);
if (0 >= month || month > 12)