请问哪里出错了

来源:6-1 练习题目

qq_心丘_0

2018-12-12 17:08

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]);
        }
    }
}


写回答 关注

1回答

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

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

C#开发轻松入门

本门课程是C#语言的入门教程,将带你轻松入门.NET开发

254118 学习 · 1459 问题

查看课程

相似问题