{try
{
Console.WriteLine("請輸入會(huì)員本月的消費(fèi)記錄");
int[] scores;
scores = new int [5];
double sum = 0;
for (int i = 0; i < scores.Length; i++)
{
Console.Write("請輸入第{0}筆購物金額",i+1);
scores[i]= Convert.ToDouble(Console.ReadLine());
sum += scores[i];
}? ? ? ? ? ? Console.WriteLine("序號? ? ? ? 金額(元)");for(inti =0; i < scores.Length; i++) {? ? ? ? ? ? ? ? Console.WriteLine("{0}? ? ? ? {1}",i+1,scores[i]);? ? ? ? ? ? }? ? ? ? ? ? Console.Write("總金額? {0}",sum);? ? ? ? }catch{? ? ? ? ? ? Console.WriteLine("你的輸入有誤");? ? ? ? }? ? ? ? Console.ReadKey();? ? }}