#编码
Console.WriteLine("请输入你的金额");
double[] money = { 199.9, 250.5, 300, 499, 100 };
double zong = 0;
for (int i = 0; i < money.Length; i++)
{
Console.Write("第{0}个金额为:", i + 1);
money[i] = Convert.ToInt32(Console.ReadLine());
zong += money[i];
}
Console.WriteLine("序号\t金额");
for (int i = 0; i < money.Length; i++)
{
Console.WriteLine("{0}\t{1}",i+1,money[i]);
}
Console.WriteLine("总金额为:{0}", zong);
Console.ReadKey();