Basic calculator donot understanding where is problem

#include
using namespace std;
int main() {
char ch;
cin>>ch;
if(ch==’+’ || ch==’-’ ||ch==’/’ || ch==’’ || ch==’%’)
{
int a,b,res=0;
cin>>a>>b;
switch(ch)
{
case ‘+’:{
res=a+b;
break;
}
case ‘-’:{
res=a-b;
break;
}
case '
’:{
res=a*b;
break;
}
case ‘/’:{
res=a/b;
break;
}
case ‘%’:{
res=a%b;
break;
}
}
cout<<res<<endl;
}
else if(ch!=‘X’ || ch!=‘x’)
{
cout<<“Invalid operation. Try again.”;
}
else
break;
return 0;
}

Go through the question again you need to take character until you dont get X or x. In your code you have taken character only once , you need to do this task again and again(use loop) and have to stop your task when you get X or x as a character

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.