Basic calculator problem

#include
using namespace std;
int main() {
char ch;
long long n1,n2;
do
{
cin>>ch;
int b=0;
switch(ch)
{
case ‘+’:
{
cin>>n1>>n2;
cout<<n1+n2<<endl;
break;
}
case ‘-’:
{
cin>>n1>>n2;
cout<<n1-n2<<endl;
break;
}
case '’:
{
cin>>n1>>n2;
cout<<n1
n2<<endl;
break;
}
case ‘/’:
{
cin>>n1>>n2;
cout<<n1/n2<<endl;
break;
}
case ‘%’:
{
cin>>n1>>n2;
cout<<n1%n2<<endl;
break;
}
case ‘X’:
case ‘x’:
{
b=1;
break;
}
default:
cout<<“invalid operation.try again.”<<endl;
}
if(b==1)
{
break;
}
}while(true);

return 0;

}
four test cases are showing fail.pls tell what is the mistake.
two testcases are showing pass

Hi @yutikakhanna
Your test cases are failing because of the default case. It should be like this :

cout<<“Invalid operation. Try again.”<<endl;

In your code I and T were not capital letters and there was no space between . and Try.

pls tell the correction

I told you the correction is that the line should be :
cout<<“Invalid operation. Try again.”<<endl;