Simple calculator

#include
using namespace std;

int main()

{ int a,b,c;

char ch;
cin>>ch;
switch(ch)
{
	case('+'): 
	{
	 cin>>a>>b;
	 c=a+b;
	 cout<<c;
	}
	case('-'): 
	{
	 cin>>a>>b;
	 c=a-b;
	 cout<<c;
	}
	case('*'): 
	{
	 cin>>a>>b;
	 c=a*b;
	 cout<<c;
	}
	case('/'): 
	{
	 cin>>a>>b;
	 c=a/b;
	 cout<<c;
	}
	case('%'): 
	{
	 cin>>a>>b;
	 c=a%b;
	 cout<<c;
	}
	case('x'):
	case('X'):exit;
	default: cout<<"Invalid operation. Try again.";
 }
return 0;

}
i am not getting my desired output please help me out

Hey @AKSHET please make sure you have break statement in each case and since it is possible to have more than 1 operation please insert it inside the while loop and exit it on receiving ‘X’ or ‘x’ as input.

Please refer the the given code for help.

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.

Thanks mate :+1:, keep the good work