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

下面的代码哪里错了

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

namespace projGetMaxScore
{
    class Program
    {
        static void Main(string[] args)
        {string[,]ch= new string[,]={{吴松,89},{钱东宇,90},{伏晨,98},{陈陆,56},{周蕊,60},{林日鹏,91},{何昆,93},{关欣,85}};
         int max = Convert.ToInt32(ch[1, 0]);     
           for(int i=0;i<ch.LongLength;i++)
           {
               if(max< Convert.ToInt32(ch[i,1]))
               {
                   max=Convert.ToInt32(ch[i,1];
               }
           Console.Write("分数最高的是"+"ch[i,0]"+",");
            Console.Write("分数是"+ch[i,1]);
           }
        }
    }
}

提问者:王者殇明 2016-10-14 20:59

个回答

  • HCTime
    2016-10-15 14:08:54

    "ch[i,0]"去掉双引号