package ch07;
import java.util.Scanner;
/**
* Created by liwenj on 2017/7/19.
*/
public class test3 {
public static void main(String[] args) {
int[] price=new int[3];
int min=0;
System.out.println("请输入四家手机价格:");
Scanner input=new Scanner(System.in);
for(int i=0;i<price.length;i++){
System.out.print("第"+(i+1)+"家手机的价格:");
price[i]=input.nextInt();
min=price[0];
if(price[i]<min){
min=price[i];
}
}
System.out.println("最便宜的价格是"+min);
}
}