Doubt in problem "Simple Input"

I am unable to figure the logical error in code due to which Test Case 3 is failing .
Solution : https://ide.codingblocks.com/s/375976

hello @gautam74

check now->

#include<iostream>
using namespace std;
int main() {
	int sum,n;
	cin>>n;
	sum=n;
	while(sum>=0){//use >=
		cout<<n<<endl;
		cin>>n;
		sum=sum+n;
	}
	return 0;
}