已采纳回答 / LeahDizon
你这个步骤有一些是多余的。。。而且思路好像错了。。我把主要代码告诉你吧。for(i=0;i<b.Length;i++){ sum+=b[i];}avge=sum/b.Length;Console.WriteLine("平均分是"+avge+","+"高于平均分的有");for(i=0;i<b.Length;i++){ if(b[i]>avge){ Console.Write(a[i]+" "); }}
2018-06-14
最赞回答 / 慕粉9455790
string[,] info = new string[8, 2] { { "吴松", "89" }, { "钱东宇", "90" }, { "伏晨", "98" }, { "陈陆", "56" }, { "周蕊", "60" }, { "林日鹏", "9" }, { "何昆", "93" }, { "关欣", "85" } }; int temp=0; for(int i=0;i<info.GetLongLength(0);i++) ...
2018-06-12
for(int i=0;i<score.Length;i++)
{
if(score[i]>Max)
{
Max=score[i];
index=i;
}
}
Console.WriteLine ("分数最高的是" + name[index] + ",分数是" + Max);
{
if(score[i]>Max)
{
Max=score[i];
index=i;
}
}
Console.WriteLine ("分数最高的是" + name[index] + ",分数是" + Max);
string[] name={"吴松","钱东宇","伏晨","陈陆","周茹","林日鹏","何昆","关欣"};
int[]score={89,90,98,56,60,91,93,85};
int Max=0;
int index=0;
int[]score={89,90,98,56,60,91,93,85};
int Max=0;
int index=0;
private int GetMaxNumber(int[] array)
{
int max = int.MinValue;
for (int index = 0; index < array.Length; index++)
{ if (max < array[index])
{
max = array[index];
} }
return max;
}
{
int max = int.MinValue;
for (int index = 0; index < array.Length; index++)
{ if (max < array[index])
{
max = array[index];
} }
return max;
}
2018-06-11
最新回答 / 韩亚强
int ageboty = 21;int agegirl = 20;if(ageboy == 22 && agegirl == 20){ Console.WriteLine("達到法定婚齡啦")}else{ Console.WrteLine("沒有達到!")}
2018-06-10