Simple Input problem

I don’t know what to do in this question?

Hi Rajat,
The question says that you have to print all the numbers before the cumulative(total) sum becomes negative.
Example:
Sample Input
1
2
88
-100
49
Here cumulative sum is kept as follows:
input…sum…output
1…1…1
2…3…2
88…91…88
-100…-9…-terminate-
49…–…--

Sir, If sum = 1 , output=1 &if sum=3 so why output is 3 ?

if input is 1, sum=1, output will be 1.
next input is 2, sum=3, output will be 2.
next input is 88, sum=91, output will be 88.
next input is -100, sum=-9, we will terminate the program.
You have to print the input number before cumulative sum becomes negative

can you help me in coding at
collaborating mode?

Sure Rajat. I will be more than happy

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.