if only cout<<n is mentioned, and the value of n is constant then how are all numbers printing in the increasing order?
Increasing order using recursion
@ebanigupta121 I think you did not get the concept well of recursion. The increasing or the decreasing order of printing depends on the position of cout statement relative to the recursive call. If cout statement is before the recursive call, then it is printing in decreasing order. If you place the cout statement after the recursive call, then it prints in increasing order. Refer the video again if you did not get it.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.