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

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

運行結果符合要求,但是提示輸出錯誤,那位大俠給診斷一下

using System;
using System.Collections.Generic;
using System.Text;

namespace projAboveAvg
{
??? class Program
??? {
??????? static void Main(string[] args)
??????? {
???????? string[,] name_score = new string[,] { { "景珍", "90" }, { "林惠洋", "65" }, { "成蓉", "88" }, { "洪南昌", "70" }, { "龍玉民", "46" }, { "單江開", "81" }, { "田武山", "100" }, { "王三明", "68" } };
??????????? double sum = 0, avg;
??????????? for (int i = 0; i<name_score.GetLength(0); ++i)
??????????? {
??????????????? sum += double.Parse(name_score[i, 1]);
??????????? }
??????????? avg = sum / name_score.GetLength(0);
??????????? Console.WriteLine("平均分是{0},高于平均分的有:", avg);
??????????? for (int i = 0; i< name_score.GetLength(0); i++)
??????????? {
??????????????? if (avg < double.Parse(name_score[i, 1]))
??????????????????? Console.Write("{0} ",name_score[i, 0]);
??????????? }???????
??????? }
??? }
}


正在回答

1 回答

平均分是{0},高于平均分的有:? ? ? ? ? 要用中文逗號?

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

舉報

0/150
提交
取消

運行結果符合要求,但是提示輸出錯誤,那位大俠給診斷一下

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

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

幫助反饋 APP下載

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

公眾號

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