mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-02-09 08:46:19 +01:00
Update sol1.rb
Follow the guidelines
This commit is contained in:
parent
de8a63dbc9
commit
b6b5873247
1 changed files with 3 additions and 2 deletions
|
@ -24,7 +24,8 @@ def is_prime?(number)
|
||||||
result = value
|
result = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def solution?(nth)
|
def solution?()
|
||||||
|
nth = 10001
|
||||||
primes = Array.new()
|
primes = Array.new()
|
||||||
num = 2
|
num = 2
|
||||||
while primes.length < nth
|
while primes.length < nth
|
||||||
|
@ -36,5 +37,5 @@ def solution?(nth)
|
||||||
primes[primes.length - 1]
|
primes[primes.length - 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
answer = solution?(10001)
|
answer = solution?()
|
||||||
p answer
|
p answer
|
Loading…
Add table
Reference in a new issue