<meta charset="utf-8">
<h3>¿Alcohol o gasolina?</h3>
<script type="text/javascript">
var tanque = 40;
var gas = 480;
var alcohol = 300;
var consumoGas = gas / tanque;
var consumoAlcohol = alcohol / tanque;
document.write("El rendimiento con gasolina es de: " + consumoGas + " km/l");
document.write("<br>");
document.write("<br>");
document.write("El rendimiento con alcohol es de: " + consumoAlcohol + " km/l");
</script>