Update exercises

This commit is contained in:
LSvekis
2021-06-28 12:05:48 -04:00
committed by GitHub
parent fc097e8962
commit a51ef86eb2
+9 -9
View File
@@ -28,15 +28,15 @@ while (!correct) {
//Exercise #3 //Exercise #3
let tempNum = ''; let tempNum = '';
let total = prompt('How many digits in the number?'); let total = prompt('How many digits in the number?');
let max = 5; let max = 5;
total = Number(total); total = Number(total);
for (let x = 0; x < total; x++) { for (let x = 0; x < total; x++) {
const ranNumber = Math.floor(Math.random() * max) + 1; const ranNumber = Math.floor(Math.random() * (max + 1)) ;
tempNum += ranNumber; tempNum += ranNumber;
} }
console.log(tempNum); console.log(tempNum);