效果
代码
Console.WriteLine("请输入年龄");
double nl = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入超始薪水");
double gz = Convert.ToInt32(Console.ReadLine());
double zg = 0;
while (nl <= 65)
{
gz = gz * 1.05;
zg += gz;
nl++;
}
Console.WriteLine("一个职员在65岁退休之前能赚到{0}",zg);
Console.ReadKey();