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>35) return;
- if(n==35) c++;
- f(n+3);
- f(n+2);
- f(n+5);
- }
- int main()
- {
- f(20);
- cout << c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement