Please answer this..I am not getting how to display no..also getting "yes" one more time than the answer
add a return value to your function, if you reach the base case return true, if you cannot reach the base case, ie sum == 0 then return false. Print yes or no according to the value returned
https://ide.codingblocks.com/s/287444…i have printed in new line but now it is showing yes for the case when sum=0
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.