We have to print the numbers till the cumulative sum become 0 but in my output only the first number is being printed
here is my code
https://ide.codingblocks.com/s/642872
Only one number is printing in output
this is because you have put semicolon after if condition
hence break will execute every time irrespective of if condition
can u plz share the corrected code thanku
Modified Code
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.