```
```
try{
int[] num = new int[6];
Console.WriteLine("请输入6个数字");
for (int i = 0; i < num.Length;i++ )
{
Console.WriteLine("第{0}个数字:",i+1);
num[i]=Convert.ToInt32(Console.ReadLine());
}
Console.WriteLine("排序后的数字为:");
Console.WriteLine("\n");
Array.Sort(num);
Array.Reverse(num);
for (int i = 0; i < num.Length; i++)
{
Console.Write("{0}\t",num[i]);
}
}catch{
Console.WriteLine("你输入的程序错误");
}
Console.ReadKey();

网友评论