mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-02-03 08:46:02 +01:00
Update sol1.rb
This commit is contained in:
parent
b6b5873247
commit
0db648a4d6
1 changed files with 2 additions and 3 deletions
|
@ -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
|
Loading…
Add table
Reference in a new issue