Add exercise LMSGI/PromedioNotas
This commit is contained in:
37
1/LMSGI/PromedioNotas/A00001_3NotasPromedio.html
Normal file
37
1/LMSGI/PromedioNotas/A00001_3NotasPromedio.html
Normal file
@ -0,0 +1,37 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>Notas</h1>
|
||||
<script type="text/javascript">
|
||||
var nota1,nota2,nota3;
|
||||
nota1=prompt('Ingrese 1ra. nota:','');
|
||||
nota2=prompt('Ingrese 2da. nota:','');
|
||||
nota3=prompt('Ingrese 3ra. nota:','');
|
||||
//Convertimos los 3 string en enteros
|
||||
nota1=parseInt(nota1);
|
||||
nota2=parseInt(nota2);
|
||||
nota3=parseInt(nota3);
|
||||
var pro;
|
||||
pro=(nota1+nota2+nota3)/3;
|
||||
if (pro>=7)
|
||||
{
|
||||
document.write('promocionado');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pro>=4)
|
||||
{
|
||||
document.write('regular');
|
||||
}
|
||||
else
|
||||
{
|
||||
document.write('reprobado');
|
||||
}
|
||||
}</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user