Time limit exceeds

#include
using namespace std;
int main() {
int a,b,r;
char op;
cin>>op>>a>>b;

while(true){
	switch (op) {
	case '+': 
		r=a+b;
		cout<<r;break;
	
	case '-': 
		r=a-b;
		cout<<r;break;
	
	case '*': 
		r=a*b;
		cout<<r;break;
	
	case '/': 
		r=a/b;
		cout<<r;break;
	
	case'X':
	break;
	case'x':break;
	default: cout<<"Invalid operation. Try again";
	

}
}


return 0;

}

please help me to “reduce time problem”

hi @yashtripathi6969_0cd127807d833066,
refer

Please tell me the reason also because code is also available on internet

hi @yashtripathi6969_0cd127807d833066 here is your code commented with all mistakes and corrections