问答详情
源自:6-1 练习题目

请问哪里出错了

using System;
using System.Collections.Generic;
using System.Text;

namespace projGetMaxScore
{
    class Program
    {
        static void Main(string[] args)
        {
            string[,] scroe={{ "吴松","89"},{ "钱东宇","90"},{ "伏晨","98"},{ "陈陆","56"},{ "周蕊","60"},{ "林日鹏","91"},{ "何昆","93"},{ "关欣","85"}};          

  int max=score[0,1];
            for (int i =0;i<score.GetLongLength(0);i++)
            {  
                if (max<string[i,1])
                {
                    max=string[i,1];
                }
            }
            Console.Write("分数最高的是{0},分数是{1}",score[i,0],score[i,1]);
        }
    }
}


提问者:qq_心丘_0 2018-12-12 17:08

个回答

  • __kirito33
    2018-12-13 08:12:43

    定义二维数组的格式就错了