Calculator problem

sir my program is showing infinite loop with this code:
#include
using namespace std;
int main()
{
int n1,n2;
char ch;
cin>>ch;

do
{
	
	switch(ch)
	{
		case '*':
		cin>>n1;
		cin>>n2;
		cout<<n1*n2<<endl;

		case '+':
		cin>>n1;
		cin>>n2;
		cout<<n1+n2<<endl;
		case '-':
		cin>>n1;
		cin>>n2;
		cout<<n1-n2<<endl;
		case '/':
		cin>>n1;
		cin>>n2;
		cout<<n1/n2<<endl;
		case '%':
		  cin>>n1;
		  cin>>n2;
		  cout<<n1%n2<<endl;
		default:
		  cout<<"Invalid Operation.Try again."<<endl;

		 
		 

	}

}while(ch!='X' or ch!='x');
	

  

return 0;

}

Could u paste the code http://ide.codingblocks.com , save it and send me the url, it would be easier to debug

at the end of the switch case u need to again cin >> ch;
so that the do while() loop condition is checked.

this would serve the purpose

sir my code is not working even after making the said modifications of cin>>ch after the switch case

Updated the code

u have not added a break after each case

break is required to get out of that switch else until a break is encountered all subsequent cases will be executed.

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.