The solution is in C++ or JAVA

Hi,

Can we have the solution in python too?
Or if there is a way we can convert these codes of different language to python.
Please do tell.

Thank you.

Hi @dikshant9sharma
Please refer to the following code :slightly_smiling_face:

 s=0
 while(1):    
  n=int(input())
  if(s+n<0):
   break
  print(n)
  s=s+n

Hope this might help :slightly_smiling_face:

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.