最新回答 / 爱吃鱼焖豆腐的H先生
小问题,注意占位符方式一Console.Write("平均分是{1},{0}", "高于平均分的有: ", avg);方式二Console.Write("平均分是{0},高于平均分的有: ", avg);
2022-11-02
最新回答 / 慕少0559658
Console.WriteLine()与Console.Write()不同,后者不换行,而前者会在打印之后换行。这里使用的是WriteLine,会在打印之后换行,而程序输出结果要求不换行,因此把WriteLine改为Write就可以了。
2022-10-21
最新回答 / 甜甜的西瓜皮皮
判断num[0]是否小于num[x]的数值,如果小于,则将num[x]的值赋值给num[0],并且将name[x]的值也赋值给name[0]。但在此之前需将本小结的数据,创建新的数组,将姓名和成绩分开存储成数组。
2022-10-18
最赞回答 / weixin_慕无忌4124023
string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" }; int[] score = new int[] { 89, 90, 98, 56, 60, 91, 93, 85 }; int max = score[0]; string Name = name[0]; for (int i = 0; i < sc...
2022-10-18
int x = 5;
int y = 5;
int z = 5;
Console.Write(++x);
Console.Write(++y);
Console.Write(++z);
int y = 5;
int z = 5;
Console.Write(++x);
Console.Write(++y);
Console.Write(++z);
2022-10-14
{if (x >= 5)
{ Console.WriteLine("5");
}
}
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("7");
}
}
}
{ Console.WriteLine("5");
}
}
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("7");
}
}
}
2022-09-29