Test cases not passing

#include
using namespace std;
int main() {
int a;
int b;
int c;

char ch;

for(int i=0; ;i++)
{ cin>>ch;
if (ch==’+’|| ch==’-’ || ch==’/’ || ch==’%’|| ch==’*’)
{
cin >> a >> b ;
}
else if (ch==‘X’ || ch==‘x’)
{
return 0 ;
}

switch(ch){
case ‘+’:

         c=a+b;
         cout<<c<<endl;
         break;

case ‘-’:

         c=a-b;
         cout<<c<<endl;
         break;

case ‘*’:

         c=a*b;
         cout<<c<<endl;
         break;

case ‘/’:
if(b!=0)
{ c=a/b;
cout<<c<<endl;}
break;
case ‘%’ :
if(b!=0)
{ c=a%b;
cout<<c<<endl;}
break;
default:
cout<<“Invalid operation. Try again”<<endl;

}}

return 0;

}

@Coder_developer22 Hey Palak, please save the code on coding blocks ide and share its link.

@Coder_developer22 hey palak is that your doubt is resolved??

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.