added julia implementation for problem 6

This commit is contained in:
ikselven 2017-07-12 00:33:48 +02:00
parent b725343392
commit 447f5ebd77

17
e0006/euler0006.jl Normal file
View file

@ -0,0 +1,17 @@
#/usr/bin/julia
function sumOfSquares(x)
sum(x.^2)
end
function squareOfSum(x)
sum(x)^2
end
function euler0006(x)
seq=1:x
squareOfSum(seq) - sumOfSquares(seq)
end
euler0006(1)
@time euler0006(100)