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

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

我的代碼運(yùn)行出來了,為什么還是提交過不了

using System;

using System.Collections.Generic;

using System.Text;


namespace projGetMaxScore

{

? ? class Program

? ? {

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

? ? ? ? {

? ? ? ? ? ? string[] name=new string[8];

? ? ? ? ? ? name[0]="吳松";

? ? ? ? ? ? name[1]="錢東宇";

? ? ? ? ? ? name[2]="伏晨";

? ? ? ? ? ? name[3]="陳陸";

? ? ? ? ? ? name[4]="周蕊";

? ? ? ? ? ? name[5]="林日鵬";

? ? ? ? ? ? name[6]="何昆";

? ? ? ? ? ? name[7]="關(guān)欣";

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

? ? ? ? ? ??

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

? ? ? ? ? ? int count=0;

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

? ? ? ? ? ? {

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

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? max=score[i];count=i;

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? ? ? Console.Write("分?jǐn)?shù)最高的是"+name[count]+","

? ? ? ? ? ? +"分?jǐn)?shù)是"+score[count]);

? ? ? ? ? ??

? ? ? ? }

? ? }

}


正在回答

3 回答

第一個(gè)類初始值是string,要使用函數(shù)調(diào)用,分?jǐn)?shù)是int類型,會出錯(cuò)

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

using System;

using System.Collections.Generic;

using System.Text;


namespace projGetMaxScore

{

? ? class Program

? ? {

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

? ? ? ? {

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

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

? ? ? ? ? ? int yy= Maxfenshu(fenshu);

? ? ? ? ? ? Console.WriteLine("分?jǐn)?shù)最高的是{0},分?jǐn)?shù)是{1}", name[2], yy);

? ? ? ? }

? ? ? ?private static int Maxfenshu(int[] yy)

? ? ? ? {

? ? ? ? ? ?

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

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

? ? ? ? ? ? {

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

? ? ? ? ? ? ? ? max = yy[i];

? ? ? ? ? ? ? ?

? ? ? ? ? ? }

? ? ? ? ? ? return max;

? ? ? ? }

? ? ? ??

? ? }


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

通過了,是因?yàn)镃onsole.Write("分?jǐn)?shù)最高的是"+name[count]+","?+"分?jǐn)?shù)是"+score[count]);里輸出的逗號應(yīng)該是中文的,不是英文符號

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

舉報(bào)

0/150
提交
取消

我的代碼運(yùn)行出來了,為什么還是提交過不了

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

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

幫助反饋 APP下載

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

公眾號

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