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
|
result = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def solution?()
|
def solution(nth = 10001)
|
||||||
nth = 10001
|
|
||||||
primes = Array.new()
|
primes = Array.new()
|
||||||
num = 2
|
num = 2
|
||||||
while primes.length < nth
|
while primes.length < nth
|
||||||
|
@ -37,5 +36,5 @@ def solution?()
|
||||||
primes[primes.length - 1]
|
primes[primes.length - 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
answer = solution?()
|
answer = solution()
|
||||||
p answer
|
p answer
|
Loading…
Add table
Reference in a new issue