<meta charset="UTF-8">
<h3>¿Alcohol o gasolina?</h3>
<script>
var tanque = 40;
var kmGasolina = 480;
var kmAlcohol = 300;
consumoGas = kmGasolina/tanque;
consumoAlc = kmAlcohol/tanque;
document.write("El consumo con gasolina es: " + consumoGas + " km/lt");
document.write("<br>");
document.write("El consumo con alcohol es: " + consumoAlc + " km/lt");
</script>