为什么会出错 错在那啊???????????
using System;
using System.Collections.Generic;
using System.Text;
namespace projAboveAvg
{
class Program
{
static void Main(string[] args)
{
string[] s = new string[8];
int[] avg = new int[8];
int sum = 0;
for (int i = 0; i < 8; ++i)
{
s[i] = Console.ReadLine();
avg[i] = int.Parse(Console.ReadLine());
sum += avg[i];
}
sum /= 8;
Console.WriteLine("平均分是{0},高于平均分的有:",sum);
for (int i = 0; i < 8; ++i)
{
if (sum < avg[i])
Console.Write("{0} ", s[i]);
}
}
}
}
为什么会出错 错在那啊???????????