Simple input(cummulative sum of inputs)

Given a list of numbers, stop processing input after cummulative sum of all the input becomes negative?
solution
After using cs>=0 its giving wrong answer…as it works till cs doesnot become negative…how to stop when there is no input but cs>=0?

#include
using namespace std;
int main()
{
int n;
cin>>n;
int cs;
cs=n;
if(n>=0)
cout<<n<<endl;
while(cs>=0)
{
int t;
cin>>t;

cs=cs+t;
if(cs>=0)
cout<<t<<endl;

}
return 0;
}

Please post the actual complete problem statement alongwith the constraints.

Continue the question in this thread only. Don’t post at multiple places.

Question-
https://hack.codingblocks.com/practice/p/339/58
Solution-One of the test case is giving wrong answer?
#include
using namespace std;
int main()
{
int n;
cin>>n;
int cs;
cs=n;
if(n>=0)
cout<<n<<endl;
while(cs>=0)
{
int t;
cin>>t;
cs=cs+t;
if(cs>0)
cout<<t<<endl;
}
return 0;
}

https://ide.codingblocks.com/s/34309

i have made the required changes and commented the mistake.

if in this code i enter
5,6,7,-3
than i think so output should be 5,6,7,-3
but it gives 5,6,7,-3,-3,-3,-3,-3,-3
it gives output till cumulative sum becomes negative

https://ide.codingblocks.com/s/34309
plz see to this
if in this code i enter
5,6,7,-3
than i think so output should be 5,6,7,-3
but it gives 5,6,7,-3,-3,-3,-3,-3,-3
it gives output till cumulative sum becomes negative

sir plz see to this…
Q-https://hack.codingblocks.com/practice/p/339/58
Soln-https://ide.codingblocks.com/s/34309

if in this code i enter
5,6,7,-3
than i think so output should be 5,6,7,-3
but it gives 5,6,7,-3,-3,-3,-3,-3,-3
it gives output till cumulative sum becomes negative even i m not giving the inputs