Transfer to git

This commit is contained in:
2026-02-03 19:37:38 -03:00
commit 9ffbd90a82
136 changed files with 5798 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
function calc() {
let resultado = 0;
const numeros = [];
const quantity = parseInt(prompt("Ingrese la cantidad de números a sumar."));
for (let i = 0; i < quantity; i++) {
numeros[i] = parseInt(prompt("Ingrese el "+(i+1)+"° número."));
while (isNaN(numeros[i]) == true) {
numeros[i] = parseInt(prompt("Repita el "+(i+1)+"° número."));
}
resultado += numeros[i];
}
alert("El resultado de la suma es "+resultado);
}