double tempvalue = 0;
//求最大
for (int i = 0; i < scores.Length; i++){
if (tempvalue > scores[i]){
continue;
}else{
tempvalue = scores[i];
}
}
for (int i = 0; i < scores.Length; i++){
if (tempvalue == scores[i]){
Console.WriteLine("分数最高的是{0},分数是{1}", names[i],scores[i]);
}
}
Console.ReadKey();
//求最大
for (int i = 0; i < scores.Length; i++){
if (tempvalue > scores[i]){
continue;
}else{
tempvalue = scores[i];
}
}
for (int i = 0; i < scores.Length; i++){
if (tempvalue == scores[i]){
Console.WriteLine("分数最高的是{0},分数是{1}", names[i],scores[i]);
}
}
Console.ReadKey();
int x;//循环计数变量
//行① 请填写计数变量的初始化语句
x = 5;
while (x > 0)//行② 请填写循环条件
{
Console.Write("加油!");
//行③ 请填写计数变量的自加语句
x--;
}
//行① 请填写计数变量的初始化语句
x = 5;
while (x > 0)//行② 请填写循环条件
{
Console.Write("加油!");
//行③ 请填写计数变量的自加语句
x--;
}
int y = 5;
while (y > 0)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
while (y > 0)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
2015-10-05