Some solutions for the julia path

This commit is contained in:
2025-08-04 19:44:03 +02:00
parent 5c52e8e34d
commit 8296c79f68
104 changed files with 4373 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
"Square the sum of the first `n` positive integers"
function square_of_sum(n)
return sum(1:n)^2
end
"Sum the squares of the first `n` positive integers"
function sum_of_squares(n)
return sum((1:n).^2)
end
"Subtract the sum of squares from square of the sum of the first `n` positive ints"
function difference(n)
return square_of_sum(n) - sum_of_squares(n)
end