#编码
try
{
Console.WriteLine("请输入价格");
double[] money = new double[4];
for (int i = 0; i < money.Length; i++)
{
Console.Write("请输入{0}个价格:", i + 1);
string str_a = Console.ReadLine();
money[i] = Convert.ToDouble(str_a);
}
Array.Sort(money);
Console.Write("最小值:{0}", money[0]);
}
catch
{
Console.WriteLine("错误");
}
Console.ReadKey();
网友评论