Failing 3 testcases. I don't understand the reason. Can u explain?

#include
using namespace std;

int main(){

char oper;
int n1,n2;

while(1){

cin>>oper;

    if((oper=='+')||(oper=='-')||(oper=='*')||(oper=='/')||(oper=='%'))
    {
    cin>>n1>>n2;
    
    if(oper=='+'){
        cout<<(n1+n2)<<endl;
       
    }  


    else if(oper=='-'){
        cout<<(n1-n2)<<endl;
        
    }

    else if(oper=='*'){
        cout<<(n1*n2)<<endl;
        
    }

    else if(oper=='/'){
        cout<<(n1/n2)<<endl;
        
    }

    else if(oper=='%'){
        cout<<(n1%n2)<<endl;
        
    }
}

else if((oper=='x')||oper=='X'){
    return(0);
}

else
    cout<<"Invalid operation. Try again.";

}

return 0;
}

Plz send your code by saving on ide

https://github.com/Bumblebee2397/Challenges—Fundamentals/blob/master/14-Basic%20Calculator

Please explain this doubt as soon as possible.

Your code is correct, it was just missing an endl in the 49th line. I have corrected it https://ide.codingblocks.com/s/80221