indent preformatted text by 4 spaces
#include
#include
using namespace std;
int main() {
int n;
int sum=0;
for(int i=0;i<=1000;i++)
{
cin>>n;
if(n<=1000 && n>=-1000)
{
sum=sum+n;
if(sum<=0)
{
break;
}
cout<<n<<endl;
}
}
return 0;
}