Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int c;
- void f(int n){
- if(n<20) return;
- if(n==20) c++;
- f(n-3);
- f(n-2);
- f(n-5);
- }
- int main()
- {
- f(35);
- cout << c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement