didn't notice it was skiping 1
This commit is contained in:
parent
996c3f9051
commit
4b96a2938e
1 changed files with 1 additions and 1 deletions
2
sive.js
2
sive.js
|
@ -15,7 +15,7 @@ const rl = readline.createInterface({ input, output });
|
||||||
rl.question('Sive to: ', (siveTo) => {
|
rl.question('Sive to: ', (siveTo) => {
|
||||||
siveTo = Number(siveTo)
|
siveTo = Number(siveTo)
|
||||||
|
|
||||||
for (var i = 1; i < siveTo; i++) {
|
for (var i = 0; i < siveTo; i++) {
|
||||||
if (isPrime(i)) {
|
if (isPrime(i)) {
|
||||||
primes.push(i)
|
primes.push(i)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue