using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? try
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("請輸入4家店的價(jià)格");
? ? ? ? ? ? ? ? int[] money = new int[4];
? ? ? ? ? ? ? ? for (int n = 0; n < money.Length; n++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Console.WriteLine("請輸入第{0}店的價(jià)格:", n + 1);
? ? ? ? ? ? ? ? ? ? money[n] = Convert.ToInt32(Console.ReadLine());
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? int a = 10000000;
? ? ? ? ? ? ? ? for (int i = 0; i < money.Length; i++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? if(money[i]<a)
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? a = money[i];
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? catch
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("你輸入的格式錯(cuò)誤");
? ? ? ? ? ? }
? ? ? ? ? ? Console.ReadKey();
? ? ? ? }
? ? }
}