Doubt in if-else-if and break statement

#include
using namespace std;
int main(){
int N;
int sum=0;
for(int i=1;i!=0;i++){
cin>>N;
sum=sum+N;
if(sum<0){
break;
}
else if(sum>=0){
cout<<N<<endl;
}
}
return 0;
}
In this code if it executes break statement then we must be out of loop and nothing should be printed but here it is going to the else if block and executing its statement how is that possible.

@Ramitcodingblocks
yeah after break statement ,we get out of the loop.
please verify ur test case by dry run that whether ur sum getting less than zero or not.