+ 1

Adding values to arrays

I'm attempting to calculate the sum of Fibonacci numbers below 4 million, but all I can think of is adding each term to an array and summing the array. Any ideas?

31st Dec 2016, 11:38 AM
Aaron
Aaron - avatar
1 Respuesta
+ 1
Why not just add them to a total while creating them?
31st Dec 2016, 11:43 AM
Dao
Dao - avatar