Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<conio.h>
- #include <stdint.h>
- using namespace std;
- int main(void)
- {
- uint64_t d = 1, z = 0, f = 0, n = 0;
- for(double i=0; i<4000000; ++i)
- {
- z = f+d;
- f = d;
- d = z;
- if(z>4000000)
- break;
- n += z;
- }
- cout << n;
- getch(); //precaution for blinking screen
- return 0;
- }
Add Comment
Please, Sign In to add comment