Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- unsigned input;
- unsigned long long fb(unsigned n)
- {
- if(n==0){cout << "return 0" << endl; return 0;}
- if(n==1){cout << "return 1" << endl; return 1;}
- return fb(n-1) + fb(n-2);
- }
- int main()
- {
- cout << "jakiej liczby silnie chcesz wyswietlic?: ";
- cin >> input;
- cout << fb(input) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement