Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int f(int n)
- {
- if (n < 2) return 1;
- return f(n-1) + f(n-2);
- }
- int main() {
- cout<<f(10)<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement