#include
using namespace std;
int main()
{
int sum=0,i,j;
while(sum>=0)
{
cin>>i;
sum=sum+i;
j=i;
}
cout<<“cumulative sum is”<<sum<<endl;
cout<<“Sorry! Now cumulative of given nos truned in to negative no”<<endl;
cout<<j<<" “<<” is the last no that truned the sum to negative";
return 0;
}