string[]name ={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[]score = {89,90,98,56,60, 91,85 };
int x = 0,y = 0;
for (int i = 0; i < score.Length; i++)
{
if (score[i] > x)
{
x = score[i]; y = i;
};
};
Console.WriteLine("分数最高的是" + name[y] + ",分数是" + x);
int[]score = {89,90,98,56,60, 91,85 };
int x = 0,y = 0;
for (int i = 0; i < score.Length; i++)
{
if (score[i] > x)
{
x = score[i]; y = i;
};
};
Console.WriteLine("分数最高的是" + name[y] + ",分数是" + x);
用程序运行正确
namespace Test
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while (y <= 5&&y>=1)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
}
}
}
namespace Test
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while (y <= 5&&y>=1)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
}
}
}
2017-07-09
namespace Test
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while (y <= 5&&y>=1)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
int y = 5;
while (y <= 5&&y>=1)//请输入
{
Console.Write(y + " ");
y--;//请输入
}
}
}
}
2017-07-09