Console.WriteLine("输入年龄");
string str_year = Console.ReadLine();
Console.WriteLine("输入始薪");
string str_money = Console.ReadLine();
try
{
int year = Convert.ToInt32(str_year);
double money = Convert.ToInt32(str_money);
double mon = money;
while (year <= 65)
{
money *= 1.05;
mon += money;
year++;
}
Console.WriteLine("你的总工资{0}",mon);
}
catch
{
Console.WriteLine("停止");
}
Console.ReadKey();