最新回答 / ddodd
string[] name = new string[] {"景珍", "林慧洋", "成蓉", "洪南昌", "龙玉民", "单江开", "田武山", "王三明"}; int[] score = new int[] {90,65,88,70,46,81,100,68}; int sum=0,avg; for(int i=0;i<score.Length;i++) { ...
2020-02-04
string[,] scores = new string[8,2]{{"吴松","89"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何昆","93"},{"关欣","85"}};
int scoreTemp = 0;//存放最大的分数
string name = "";//存放人员
int scoreTemp = 0;//存放最大的分数
string name = "";//存放人员
//bool hasNopass = false;//记录是否有不及格的,默认没有for (int i = 0; i < score.Length; i++)
{
if (score[i] < 60)//如果有不及格的
{
Console.WriteLine("有人不及格");//记录有不及格的
break;
}
if (i==score.Length-1)
Console.WriteLine("都及格啦!");
}
//if (hasNopass)
// Console.WriteLine("有人不及格");
//else
// Console.WriteLine("都及格啦!")
{
if (score[i] < 60)//如果有不及格的
{
Console.WriteLine("有人不及格");//记录有不及格的
break;
}
if (i==score.Length-1)
Console.WriteLine("都及格啦!");
}
//if (hasNopass)
// Console.WriteLine("有人不及格");
//else
// Console.WriteLine("都及格啦!")
2020-01-10