第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

新手只能寫成這樣了,不知道怎么用二維數(shù)組寫?

static void Main(string[] args)

? ? ? ? {

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

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

? ? ? ? ? ? int maxpeople = 0;

? ? ? ? ? ? int maxscore = 0;

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

? ? ? ? ? ? ? ? if (score[i]>maxscore){

? ? ? ? ? ? ? ? ? ? maxscore = score[i];

? ? ? ? ? ? ? ? ? ? maxpeople = i;

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? ? ? Console.Write("分數(shù)最高的是"+names[maxpeople]+",分數(shù)是"+score[maxpeople]);

? ? ? ? }


正在回答

2 回答

并不能 強類型語言 數(shù)組內類型必須一致

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

船丿長 提問者

非常感謝!
2017-09-30 回復 有任何疑惑可以回復我~

??????????? string[,] test = new string[8, 2] { { "吳松", "89" }, { "錢東宇", "90" }, { "伏晨", "98" }, { "陳璐", "56" }, { "周蕊", "60" }, { "林日鵬", "91" }, { "何坤", "93" }, { "關欣", "85" } };
??????????? int a = 0 , ii = 0;
??????????? string b = "";

??????????????? for (int i = 0; i < test.GetLongLength(0); i++)
??????????????? {
??????????????????? if (Convert.ToInt32(test[i, 1]) > a)
??????????????????? {
??????????????????????? //Console.WriteLine(test[i, 1]);
??????????????????????? a = Convert.ToInt32(test[i, 1]);
??????????????????????? b = test[i, 0];
??????????????????????? ii = i;
??????????????????? }

??????????????? }
??????????? Console.WriteLine(a);
??????????? Console.WriteLine(b);
??????????? Console.WriteLine(ii);


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

舉報

0/150
提交
取消

新手只能寫成這樣了,不知道怎么用二維數(shù)組寫?

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

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號