Update sol1.rb

This commit is contained in:
domix80 2023-02-21 18:39:37 +01:00
parent b6b5873247
commit 0db648a4d6

View file

@ -24,8 +24,7 @@ def is_prime?(number)
result = value
end
def solution?()
nth = 10001
def solution(nth = 10001)
primes = Array.new()
num = 2
while primes.length < nth
@ -37,5 +36,5 @@ def solution?()
primes[primes.length - 1]
end
answer = solution?()
answer = solution()
p answer