Add exercise LMSGI/PromedioNotas

This commit is contained in:
2022-04-26 20:05:23 +02:00
parent 161dae282e
commit 5c76e808f0
3 changed files with 118 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Promedio de Notas</title>
<script type="text/javascript">
function average() {
var notaISO = parseInt(document.getElementById("notaISO").value);
var notaLMSGI = parseInt(document.getElementById("notaLMSGI").value);
var notaGBD = parseInt(document.getElementById("notaGBD").value);
var avg = (notaISO + notaLMSGI + notaGBD)/3;
alert("La nota media es " + avg);
}
</script>
</head>
<body>
<h1>Calculadora Promedio Notas</h1>
<form>
<label>ISO:</label><br />
<input type="number" id="notaISO" name="notaISO" min="0" max="10" value="0" ><br />
<label>LMSGI:</label><br />
<input type="number" id="notaLMSGI" name="notaLMSGI" min="0" max="10" value="0" ><br />
<label>GBD:</label><br />
<input type="number" id="notaGBD" name="notaGBD" min="0" max="10" value="0" ><br />
<button onclick="average()" >Calcular</button>
</form>
</body>
</html>