Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void fibo(int n)
- {
- int a = 0, b = 1, temp;
- cout << a << " " << b<<" ";
- while (n>=0)
- {
- temp = b;
- b = b + a;
- a = temp;
- n--;
- cout << b << " ";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement