Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void printFibonacci(int n)
- {
- for (int i = 1, tmp = 0; i <= n; i += tmp)
- {
- tmp += i;
- cout << i << TAB << tmp << TAB;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement