Not understand question clearly

I am not clearly understand what question says…
the question says that we have to print integers until the sum is not equals to zero but in your sample I/O the thing is different…

here is my code:-
https://hack.codingblocks.com/app/practice/3/p/58

@sonu28sharma99 The input is a running stream and this can done by using a while loop
In the while loop the condition is true. So loop would be like this while(true). Break the loop as soon as cumulative sum becomes negative ie. You have to stop the working of this while loop when sum of all previous value become negative else you have to print the series of the previous input like sample data is like
1
2
88
-100
49
so 1+2+88-100=-9
so cumulative sum became negative
so series will print upto
1
2
88

my question is why 49 is present

49 was provided in the input but before 49, a negative cumulative sum was reached so you will not include that.

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.

my doubt is not clear Please give me the pseudo code …i try it many time but my logic is not click here…:man_shrugging:

@sonu28sharma99 The question is preint until the sum is greater than 0

please give the solution of this question

i try it many time but i’m not go to the correct approach…

I have already explained it earlier.
If you know what a cumulative sum is then this problem is quite easy. If you do not know about it then please refer the lecture videos. There are already videos on cumulative sum and Kadane algorithm.
However…refer this: