int[] score = new int[] {89,39,100,51,94,65,70 };//分数
Console.Write("不及格的有:");
for (int i = 0; i < score.Length ; i++)
{
if( score[i]<60 )//筛选条件
Console.Write(score[i]+",");
}
Console.Write("不及格的有:");
for (int i = 0; i < score.Length ; i++)
{
if( score[i]<60 )//筛选条件
Console.Write(score[i]+",");
}
2018-01-17
string[] job = new string[]{"经理","项目主管","技术总监","财务主管"};
for (int i = 0; i < job.Length ; i++)
{
Console.Write(job[i]);//打印职位
}
for (int i = 0; i < job.Length ; i++)
{
Console.Write(job[i]);//打印职位
}
2018-01-17
//吴松89 钱东宇90 伏晨98 陈陆56 周蕊60 林日鹏91 何昆93 关欣85
//声明两个数组,下标姓名分数相对应
string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = new int[] { 89,90,98,56,60,81,83,85};
int max = 0;//用来存储最高分
int y = 0; //用来记录下标
//声明两个数组,下标姓名分数相对应
string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = new int[] { 89,90,98,56,60,81,83,85};
int max = 0;//用来存储最高分
int y = 0; //用来记录下标