Skip to content

Commit 0db648a

Browse files
committed
Update sol1.rb
1 parent b6b5873 commit 0db648a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

project_euler/problem_007/sol1.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def is_prime?(number)
2424
result = value
2525
end
2626

27-
def solution?()
28-
nth = 10001
27+
def solution(nth = 10001)
2928
primes = Array.new()
3029
num = 2
3130
while primes.length < nth
@@ -37,5 +36,5 @@ def solution?()
3736
primes[primes.length - 1]
3837
end
3938

40-
answer = solution?()
39+
answer = solution()
4140
p answer

0 commit comments

Comments
 (0)