Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

clang 8.0.0

Options
Warnings
Optimization
Don't Use Boost
C++17
-pedantic

Author

anonymous

over 5 years ago

$ clang++ prog.cc -Wall -Wextra -O2 -march=native -std=c++17 -pedantic
  i      F(i)       sum      calls
-----------------------------------
  2         2         2          2
  5         8        10         19
  8        34        44        100
 11       144       188        453
 14       610       798       1958
 17      2584      3382       8343
 20     10946     14328      35400
 23     46368     60696     150025
 26    196418    257114     635594
 29    832040   1089154    2692507
 32   3524578   4613732   11405740

The sum of all even Fibonacci numbers less then 4000000 is 4613732
Exit Code:
0