Skip to content

Commit bb5df87

Browse files
domix80aparibocci
andauthored
Update project_euler/problem_006/sol1.rb
Co-authored-by: Amos Paribocci <aparibocci@gmail.com>
1 parent 1fd68f2 commit bb5df87

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

project_euler/problem_006/sol1.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
#Find the difference between the sum of the squares of the first one
1212
#hundred natural numbers and the square of the sum.
1313

14-
def solution?()
15-
num = 10
14+
def solution(num=10)
1615
x = 1
1716
y = 1
1817
result = 1
@@ -29,5 +28,5 @@ def solution?()
2928
r_sum_n_pow2 - r_n_pow2_plus_n_pow2
3029
end
3130

32-
answer = solution?()
31+
answer = solution()
3332
p answer

0 commit comments

Comments
 (0)