<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculo consumo</title>
</head>
<body>
<h3>¿Alcohol o gasolina?</h3>
<script>
var lit=40;
var caminogas=480;
var consumogas= caminogas/lit;
var caminoalcohol=300;
var consumalcohol=caminoalcohol/lit;
document.writeln("El consumo de gasolina es de: "+consumogas);
document.write("<br>")
document.writeln("El consumo de alcohol es de: "+consumalcohol)
</script>
</body>
</html>