作业要求:
#作业代码:
try {
Console.WriteLine("请输入价格");
double[] money = new double[4];
double min = 0;
for (int i = 0; i < money.Length; i++)
{
Console.Write("请输入{0}个价格:", i + 1);
string str_a = Console.ReadLine();
money[i] = Convert.ToDouble(str_a);
for (int j = 0; j < money.Length - 1 - i; j++)
{
min = money[j];
}
}
Console.Write("最小值:{0}", min);
}
catch
{
Console.WriteLine("错误");
}
Console.ReadKey();