package cn.dadongzicool.horse;
import java.util.Scanner;
public class Horse {
/**
* @param args
* @return
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double horseHour[] = new double[4];
double minHorseHour;//用时最少的马
double resultHour;//结果
Scanner reader = new Scanner(System.in);
System.out.println("Please enter the Hour of horse!!!");
for(int i = 0;i < horseHour.length;i++){
horseHour[i] = reader.nextDouble();
}
minHorseHour = horseHour[0];
for(int i = 1;i < 4;i++){
//选出速度最快的马
if(horseHour[i] < minHorseHour)
minHorseHour = horseHour[i];
}
resultHour = horseHour[0]+horseHour[1]+horseHour[2]+horseHour[3]-minHorseHour+2*minHorseHour;
System.out.println("resultHour = "+resultHour);
}
}