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

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

6-1幫我看看哪里錯了

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;


namespace ConsoleApptest1

{

? ? class Program

? ? {

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

? ? ? ? {

? ? ? ? ? ? int x=0;

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

? ? ? ? ? ? int max = Convert.ToInt32(arr[1, 0]); ? ? ?//把吳松的89設(shè)為最高分 ?分數(shù)max因為是int類型所以要轉(zhuǎn)換

? ? ? ? ? ? for(int i=0;i<arr.GetLength(0);i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? if (max < Convert.ToInt32(arr[i, 1]))

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? max = Convert.ToInt32(arr[i, 1]);

? ? ? ? ? ? ? ? ? ? x=i;

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? ? ? Console.Write("分數(shù)最高的是{0},分數(shù)是{1}", arr[x,0], arr[x,1]);

? ? ? ? }

? ? }

}


正在回答

3 回答

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;


namespace ConsoleApptest1

{

? ? class Program

? ? {

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

? ? ? ? {

? ? ? ? ? ? int x=0;

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

? ? ? ? ? ? int max = Convert.ToInt32(arr[0, 1]); ? ? ?//把吳松的89設(shè)為最高分 ?分數(shù)max因為是int類型所以要轉(zhuǎn)換

? ? ? ? ? ? for(int i=0;i<arr.GetLongLength(0);i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? if (max < Convert.ToInt32(arr[i, 1]))

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? max = Convert.ToInt32(arr[i, 1]);

? ? ? ? ? ? ? ? ? ? x=i;

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? ? ? Console.Write("分數(shù)最高的是{0},分數(shù)是{1}", arr[x,0], arr[x,1]);

? ? ? ? }

? ? }

}


0 回復(fù) 有任何疑惑可以回復(fù)我~

已解決.

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

巴塞羅那之戀

怎么改的啊
2017-06-16 回復(fù) 有任何疑惑可以回復(fù)我~

x是用來儲存最高分的索引的

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

6-1幫我看看哪里錯了

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

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

公眾號

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