Dont understand the input limit condition

i dont understand as to for how long i have to get inputs. there is no condition for length on inputs.

first i thought i have to get user input till cumulative sum becomes negative but thats not the case. So could you please help me regarding the condition upto which i have to take the user inputs

@j4jeetu18
What you thought was correct.
You have to take the inputs till cumulative sum becomes negative. That is the only condition.

That was what i thought first but as u might be able to see that in the question’s example the inputs are 1 2 88 -100 49 If what u said was right then it should not have taken input 49 but it did. Why is that ?

@j4jeetu18
The input is provided as a file.
However in your program, you can simply stop taking the input as it breaks the condition and not the read any further input. Its your choice whether you want to even read the remaining input or not.

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.