Skip to content

Commit b6b5873

Browse files
committed
Update sol1.rb
Follow the guidelines
1 parent de8a63d commit b6b5873

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

project_euler/problem_007/sol1.rb

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

27-
def solution?(nth)
27+
def solution?()
28+
nth = 10001
2829
primes = Array.new()
2930
num = 2
3031
while primes.length < nth
@@ -36,5 +37,5 @@ def solution?(nth)
3637
primes[primes.length - 1]
3738
end
3839

39-
answer = solution?(10001)
40+
answer = solution?()
4041
p answer

0 commit comments

Comments
 (0)