Simple input question

in this code if i am giving input in one line correct answer is showing but on giving input in multiple lines wrong answer is coming. so please can u tell me how to take these multi line inputs into a single list as i am using list and in these multi line input only the first input is coming in the listcode

Hey,
Try to implement this :

sum = 0
while sum >=0:
   n = int(input())
   sum+=n
   if (sum<=0):
      break
   print(n)

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.