最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

哪里錯(cuò)了,怎么不能運(yùn)行出來(lái)

using System;

using System.Collections.Generic;

using System.Text;


namespace projGetMaxScore

{

? ? class Program

? ? {

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

? ? ? ? {

? ? ? ? ? ? string[] scores={89,80,98,56,60,91,93,85};

? ? ? ? ? ? string[] names={吳松,錢(qián)東宇,伏晨,陳陸,周蕊,林日鵬,何昆,關(guān)欣};

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

? ? ? ? ? ??

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

? ? ? ? ? ? if(max<scores[i])

? ? ? ? ? ? max=scores[i];

? ? ? ? ? ??

? ? ? ? ? ? {

? ? ? ? ? ? ? ? Console.WriteLine(最高分?jǐn)?shù)是"+names[i]+",分?jǐn)?shù)是"+max");

? ? ? ? ? ? }

? ? ? ? }

? ? }

}

using System;

using System.Collections.Generic;

using System.Text;


namespace projGetMaxScore

{

? ? class Program

? ? {

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

? ? ? ? {

? ? ? ? ? ? string[] scores={89,80,98,56,60,91,93,85};

? ? ? ? ? ? string[] names={吳松,錢(qián)東宇,伏晨,陳陸,周蕊,林日鵬,何昆,關(guān)欣};

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

? ? ? ? ? ??

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

? ? ? ? ? ? if(max<scores[i])

? ? ? ? ? ? max=scores[i];

? ? ? ? ? ??

? ? ? ? ? ? {

? ? ? ? ? ? ? ? Console.WriteLine(最高分?jǐn)?shù)是"+names[i]+",分?jǐn)?shù)是"+max");

? ? ? ? ? ? }

? ? ? ? }

? ? }

}


正在回答

3 回答

if選擇語(yǔ)句里少“{}”大括號(hào)


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

scores的數(shù)組不是整數(shù)類(lèi)型的嗎?你用的是string類(lèi)

int [] scores={89,80,98,56,60,91,93,85};

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

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

? ? ? ? ? ? int index = 0;

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

? ? ? ? ? ? {

? ? ? ? ? ? ? ? if (max < scores[i])

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? max = scores[i];

? ? ? ? ? ? ? ? ? ? index = i;

??

? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ??

? ? ? ? ? ? }

? ? ? ? ? ? Console.WriteLine("最高分?jǐn)?shù)是" + names[index] + ",分?jǐn)?shù)是" + max);


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

你的“最高分?jǐn)?shù)是”你是不是缺了前面的 ”?這里用的是字符串

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

舉報(bào)

0/150
提交
取消

哪里錯(cuò)了,怎么不能運(yùn)行出來(lái)

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

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

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