SImple input challenge 1 problem

Can you please help me to find how to write the condition when we have to stop the code using break in the code.I am unable to find the condition i am trying with if else

Sure @lakshyamutneja,

There are two things you have to keep in mind while writing code for this problem:
Let’s read the question once again

  1. stop processing input after the cumulative sum of all the input becomes negative.
    This means you have to input accept input and calculate cum_sum repeated, until cum_sum becomes negative.
    You must have learned about a control flow that causes repeated execution of the same set of operations/instructions.
    Loops, yes. You have to use loops here.

2.cumulative sum of all the input becomes negative.
Use this condition inside the loop.

You can refer to the following code for better understanding.

Hope, this would help.
Give a like, if you are satisfied.