try
{
Console.WriteLine("请输入会员本月的消费记录:");
string[] money = new string[5];
for (int i = 0; i < money.Length; i++)
{
Console.WriteLine ("请输入第{0}个购物金额:",i+1);
money[i] =(i+1 +" " + Console .ReadLine ());
}
Console.WriteLine ("序号 金额(元)");
foreach (var item in money)
{
Console.WriteLine(item);
}
}
catch
{ Console.WriteLine ("程序错误");
}
Console.ReadKey();