第十一节课第二个作业
#编码
try
{
Console.WriteLine("输入六个数");
double[] num = new double[6];
for (int i = 0; i < num.Length; i++)
{
Console.Write("输入第{0}个数:", i + 1);
string str_a = Console.ReadLine();
num[i] = Convert.ToDouble(str_a);
}
Array.Sort(num);
Array.Reverse(num);
Console.WriteLine("排序是");
for (int i = 0; i < num.Length; i++)
{
Console.Write("{0}\t", num[i]);
}
}
catch
{
Console.WriteLine("错误");
}
Console.ReadKey();