I am not able to run this program pls check for error

#include
using namespace std

int main() {
char ch;
cin>>ch;
int N1;
cin>>N1;
int N2;
cin>>N2;
switch(ch)
{
case’+’:cout<<N1+N2<<endl;
break;
case ‘-’: cout<<N1-N2<<endl;
break;
case ‘’: cout<<N1N2<<endl;
break;
case ‘/’: cout<<N1/N2<<endl;
break;
case’%’:cout<<N1/N2<<endl;
break;
case ‘X’:
case’x’: exit(0);

	default cout<<"invalid operation . Try again."<<endl;
	break;

}

return 0;

}

hi @suryansh771 please share your code by saving it on cb ide

hi @suryansh771 see the question statement carefully
If ch is any other character, the program should print ‘Invalid operation. Try again.’ and seek inputs again (starting from character).
To seek input again, you will need a while loop.

i am not getting where to insert while loop in this program pls help

@suryansh771 you can make the loop condition to be such thatit breaks if ch == X or ch == x
while(ch != 'x' && ch != 'X')

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.