Given a list of numbers, stop processing input after the cumulative sum of all the input becomes negative.
Input Format
A list of integers to be processed
int main()
{
int i,n,a,b;
for(i=1,b=0;i>0;)
{
cin>>n;
a=b+n;
if(a<=0)
{
break;
}
cout<<n<<endl;
b=n;
}
}