i am not understanding the problem in my code but test cases failed for some inputs message is showing why ?
this is my code:
#include
using namespace std;
int main() {
int n;
cin>>n;
int i=1,sum=0;
while(i<=n)
{
int no;
cin>>no;
sum=sum+no;
if(sum<0)
break;
cout<<no<<endl;
i++;
}
return 0;
}