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

哇 输出的和题目要求一模一样,可就是说输出错误

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

提问者:好多名已占用 2019-03-28 11:51

个回答

  • 好多名已占用
    2019-03-28 11:52:55

    服了,刚刚解决了,最后的,得是中文的,还是要紧接在{0}后面,服了服了。