Add problem statement

This commit is contained in:
David Doblas Jiménez 2021-06-15 19:40:23 +02:00
parent e45bcfdc4d
commit cb9e385215

View File

@ -10,7 +10,13 @@ https://projecteuler.net/problem=2
function Problem2()
#=
Statement
Each new term in the Fibonacci sequence is generated by adding the
previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
Find the sum of all the even-valued terms in the sequence which do not
exceed four million.
=#
ans = 0
@ -23,7 +29,7 @@ function Problem2()
y = z + x
z = x + y
end
return ans
end