The program I'm trying to write is supposed to calculate the sum of the even Fibonacci numbers less than 4 million. My code generates the correct values of the sequence, but the sum outputs 2.
It seems that the nested if statement is only executing on the first iteration of the while loop, am I missing something?
Ah I see I was thinking he had lines 18-22 and line 16 switched. I like to start mine with f1 & f2 instead of f0 & f1 it's just a preference I suppose.