code- https://ide.codingblocks.com/s/59166
testcase 3 failed .what is the probem i can’t find
C++ launch pad (simple input)
https://ide.codingblocks.com/s/59172 use break statement in case of while loop. use true in while.i have corrected your code
Hey Rishav, as it is mentioned in the problem that you have to stop processing only when your cumulative sum becomes negative, so that means you have to print the number even when sum is 0. So, update your code’s line:12 like this if(sum>=0).
Hey Rishav, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “Ask Doubt” section, when your doubt is resolved.