亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我幾秒鐘就做出來了0.0

Console.WriteLine("分數最高的是伏晨,分數是98");

正在回答

3 回答

using System;

using System.Collections.Generic;

using System.Text;

using System.Collections;


namespace projGetMaxScore

{

? ? class Program

? ? {

? ? ? ? static void Main(string[] args)

? ? ? ? {

? ? ? ? ? ? string[,] names = new string[,] { { "吳松", "89" }, { "錢東宇", "90" }, { "伏晨", "98" }, { "陳陸", "56" }, { "周蕊", "60" }, { "林日鵬", "91" }, { "何昆", "93" }, { "關欣", "85" } };

? ? ? ? ? ? string student = "None";

? ? ? ? ? ? int max = 0;

? ? ? ? ? ? for (int i=0;i<8;i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? int text= Convert.ToInt32(names[i, 1]);

? ? ? ? ? ? ? ? string name = names[i,0];

? ? ? ? ? ? ? ? if(text>max)

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? max=text;

? ? ? ? ? ? ? ? ? ? student=name;

? ? ? ? ? ? ? ? ? ??

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? ? ? Console.WriteLine("最高分數的是"+student+",分數是"+max+"。");

? ? ? ? }

? ? }

? ??

}


0 回復 有任何疑惑可以回復我~

using System;

using System.Collections.Generic;

using System.Text;

using System.Collections;


namespace projGetMaxScore

{

? ? class Program

? ? {

? ? ? ? static void Main(string[] args)

? ? ? ? {

? ? ? ? ? ? string []name={"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};

? ? ? ? ? ? int [] grades= {89,90,98,56,60,91,93,85};

? ? ? ? ? ? int k=0;

? ? ? ? ? ? int max = grades[0];

? ? ? ? ? ? for (int i=0;i<grades.Length;i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? if (grades[i]>max)

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? max=grades[i];

? ? ? ? ? ? ? ? ? ? k=i;

? ? ? ? ? ? ? ? ? ??

? ? ? ? ? ? ? ? }

? ? ? ? ? ??

? ? ? ? ? ? }

? ? ? ? ? ? Console.WriteLine("最高分數的是"+name[k]+",分數是"+max+"。");

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? }

? ? }


0 回復 有任何疑惑可以回復我~

你好厲害啊?

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

我幾秒鐘就做出來了0.0

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號