Adding values to arrays | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answer
+ 1
Why not just add them to a total while creating them?
31st Dec 2016, 11:43 AM
Dao
Dao - avatar