Console.WriteLine("输入年龄");stringstr_year = Console.ReadLine(); Console.WriteLine("输入始薪");stringstr_money = Console.ReadLine();try{intyear = Convert.ToInt32(str_year);doublemoney = Convert.ToInt32(str_money);doublemon = money;while(year <=65) { money *=1.05; mon += money; year++; } Console.WriteLine("你的总工资{0}",mon); }catch{ Console.WriteLine("格式输入错误"); } Console.ReadKey();
![](https://img.haomeiwen.com/i14494420/4727a275c4f1c7dc.png)
网友评论