public class Race {
static void leManRace(Car[] cars){
int hours = 24;
String fastCar ="";
for (int i=1; i calculateDistance(cars[i - 1].speed, hours)) {
fastCar = cars[i].name;
} else {
fastCar = cars[i - 1].name;
}
}
System.out.println("Ð¡Ð°Ð¼Ð°Ñ Ð±ÑÑÑÑÐ°Ñ Ð¼Ð°Ñина: "+fastCar);
}
static int calculateDistance(int speed,int hours){
return speed * hours;
}
}