string[] name = {"景珍", ...};
int[] score = {90,...};
double seq = 0;
string pass = null;
foreach (int x in score)
{
seq = x + seq;
}
seq = seq/score.Length;
for (int i=0;i<score.Length;i++)
if (score[i]>seq)
{
pass=pass+name[i]+" ";
}
Console.WriteLine("平均分是"+ seq +",高于平均分的有:");
Console.Write(pass);
int[] score = {90,...};
double seq = 0;
string pass = null;
foreach (int x in score)
{
seq = x + seq;
}
seq = seq/score.Length;
for (int i=0;i<score.Length;i++)
if (score[i]>seq)
{
pass=pass+name[i]+" ";
}
Console.WriteLine("平均分是"+ seq +",高于平均分的有:");
Console.Write(pass);
已采纳回答 / qq_光辉de岁月_0
int x =1while(true)//条件一直成立,一直循环{ x++; if (x>10) //需加入条件判断,中止循环 break;}
2018-01-08
Console.WriteLine((score>95)?"奖励一辆自行车":"");
2018-01-04
char[,] ch = { {'我','是','软'},{'件','工','程'},{'师','啦','!'}};
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]);
}
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]);
}
2018-01-03
//声明“职位”数组,初始化为:"经理","项目主管","技术总监","财务主管"
string[] job = new string[1];
job[0]=("经理项目主管技术总监财务主管");
for (int i = 0; i < job.Length; i++)
{
Console.WriteLine(job[i]);//打印职位
}
string[] job = new string[1];
job[0]=("经理项目主管技术总监财务主管");
for (int i = 0; i < job.Length; i++)
{
Console.WriteLine(job[i]);//打印职位
}
2018-01-03