求指出错误,提示上说temp1有问题?
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
string[] name = {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score= {89,90,98,56,60,91,93};
int temp = score[0];
string temp1 = name[0];
for (int i = 1;i < 7;i++)
{
if(score[i+1] > temp)
{
temp = score[i+1];
temp1 = name[i+1];
}
}
{
Console.WriteLine("分数最高的是{0},分数是{1}","temp1",temp) ;
}
}
}
}