using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
string[] name = new string[5];
int[] score = new int[5];
for(int i=0;i<name.Length;i++)
{
name[i]=Console.ReadLine();
score[i] = int.Parse (Console.ReadLine());
}
int sum = 0, avg;
foreach(int a in score)
{
sum += a;
}
avg = sum / 5;
Console.WriteLine("总分是{0},平均分是{1}", sum, avg);
}
}
}
int sum = 0, avg;
这里错了