Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int phi(int n)
- {
- if (n<2) return 1;
- else return phi(n-1)+phi(n-2);
- }
- int main()
- {
- int n;
- cin>>n;
- cout<<phi(n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement