怎么網頁就不對
為什么網頁提交就不正確呢,studio里就可以
using System;
using System.Collections.Generic;
using System.Text;
namespace projAboveAvg
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ?string [] name={"景珍","林惠洋","成蓉","洪南昌","龍玉民","單江開","田武山","王三明"};
? ? ? ? ? ? int [] score={90,65,88,70,46,81,100,68};
? ? ? ? ? ? int sum=0,avg=0;
? ? ? ? ? ? for(int i=0;i<score.Length;i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? sum+=score[i];
? ? ? ? ? ? ? ??
? ? ? ? ? ? }?
? ? ? ? ? ? ?avg=sum/score.Length;
? ? ? ? ? ? Console.WriteLine("平均分是{0},高于平均分的有:", avg);
? ? ? ? ? ? for (int i = 0; i < score.Length; i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? if (score[i] > avg)
? ? ? ? ? ? ? ? ? ? Console.Write(name[i] + " ");
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
2016-12-09
你的冒號是英文的,試試中文的:
2016-12-09
Console.Write("平均分是76,高于平均分的有:");
? ? ? ? ? ?Console.WriteLine("景珍 成蓉 單江開 田武山 ");
網頁編輯器有錯吧,這個可以