string[]names={"A","B","C","D","E","F","G"};
int[] score = new int[] {89,39,100,51,94,65,70 };
Console.Write("不及格的有:");
for (int i = 0; i <names.Length ; i++)
{
if(score[i]<60 )
Console.Write(names[i]+",");
}
int[] score = new int[] {89,39,100,51,94,65,70 };
Console.Write("不及格的有:");
for (int i = 0; i <names.Length ; i++)
{
if(score[i]<60 )
Console.Write(names[i]+",");
}
2017-09-27
最赞回答 / valenbine
using System;using System.Collections.Generic;using System.Text;namespace projAboveAvg{ class Program { static int Avg(int[] scores) { int avgscore=0; int sum = 0; foreach (var score in scores) ...
2017-09-25
命名空间中包含若干各类,mian方法是C#程序的入口,运行一个程序的命令是conslse.write
2017-09-23