Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int fun(int n)
  4. {
  5. if(n>0)
  6. {
  7. cout<<n<<" ";
  8. fun(n-1);
  9. fun(n-1);
  10. }
  11. }
  12. int main()
  13. { fun(3);
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement