<meta charset="UTF-8">
<h3>¿Alcohol o gasolina?</h3>
<script>
var tanque = 40;
var kmGasolina = 480;
var consumoGasolina = kmGasolina/tanque;
var kmAlcohol = 300;
var consumoAlcohol = kmAlcohol/tanque;
document.write ("GASOLINA" + "<br>" + "<br>");
document.write ("Si gastamos " + tanque + " litros " + " y recorrimos " + kmGasolina + " Km " + "<br>");
document.write ("el consumo de gasolina es: " + consumoGasolina + " Km/litro");
document.write ("<br>")
document.write ("<br>")
document.write ("ALCOHOL")
document.write ("<br>")
document.write ("<br>")
document.write ("Si gastamos " + tanque + " litros " + " y recorrimos " + kmAlcohol + " Km " + "<br>");
document.write ("el consumo de Alcohol es: " + consumoAlcohol + " km/litro");
</script>