#given alist of number, stop processing input after the cumulative sum of the input becomes negative
a=[]
sum=0
b=int(input(“Enter the no of digits:”))
for x in range(b):
num=int(input(“Enter the digit:”))
a.append(num)
for x in range(b):
print(a[x])
sum=sum+a[x]
print(“the sum is”,sum)
if(sum>0):
print(a[x])
else:
break
Happy Coding !!