各位大佬看,这样写怎么样
using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
int[] num = new int[] { 89, 90, 98, 56, 60, 91,93,85 };
string[] name = new string[] { "1", "2", "3", "4", "5", "6", "7", "8" };
int x = 0;
int max = num[0];
for (int i=0;i<name.Length;i++)
{
if (num[i] > max)
{
max = num[i];
x++;
}
}
Console.WriteLine("最好分姓名" + name[x] + "分数是" + max);
}
}
}