Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fibLead = 1; fibCurrent = 0; fibTrail = 0; fibSum = 0;
- while (fibLead <= 4000000):
- fibTrail = fibCurrent
- fibCurrent = fibLead
- fibLead = fibCurrent + fibTrail
- if fibLead %2 == 0:
- fibSum += fibLead
- print (fibSum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement