What is the problem in my code?

(all header files included)

using namespace std;

int main() {

char ch;
int n1,n2,result;
do
{
	cin>>ch;
	switch(ch)
	{
		case '+': cin>>n1>>n2;
				  result=n1+n2;
				  cout<<result<<endl;
				  break;
		case '-': cin>>n1>>n2;
				  result=n1-n2;
				  cout<<result<<endl;
				  break;
		case '*': cin>>n1>>n2;
				  result=n1*n2;
				  cout<<result<<endl;
				  break;
		case '/': cin>>n1>>n2;
				  result=n1/n2;
				  cout<<result<<endl;
				  break;
		case '%': cin>>n1>>n2;
				  result=n1%n2;
				  cout<<result<<endl;
				  break;
	}
	if(ch=='x'||ch=='X')
	break;
	else if((ch!='+')&&(ch!='-')&&(ch!='*')&&(ch!='/')&&(ch!='%'))
	{
		cout<<"Invalid Operation.Try Again"<<endl;
		continue;
	}
	
}while((ch!='x')and(ch!='X'));
return 0;

}

This is the code for the basic calculator question. The sample input passes correctly and generates the correct output . However none of the test cases pass.Please tell me my mistake?

hi @abhaysota the exact statement to be printed is this: Invalid operation. Try again.

hi. its still not working.

@abhaysota as i can see your latest submission has 100 points, please mark this doubt as resolved in case of no further queries

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.