Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void fun(int n)
  6. {
  7. if(n>0)
  8. {
  9. fun(n-1);
  10. cout <<n<<endl;
  11.  
  12. }
  13. }
  14.  
  15. int main()
  16. {
  17.  
  18. int x=5;
  19. fun(x);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement