Please check the code below and tell me why the above error has occured …
#include
using namespace std ;
int main(){
char ch;
long long int N1,N2;
long long res;
do
{
switch(ch){
case '+' : cin>> N1 >> N2;
res = N1+N2;
cout << res ;
break;
case '-' : cin>> N1 >> N2;
res = N1-N2;
cout << res ;
break;
case '*' : cin>> N1 >> N2;
res = N1*N2;
cout << res ;
break;
case '/' : cin>> N1 >> N2;
res = N1/N2;
cout << res ;
break;
case '%' : cin>> N1 >> N2;
res = N1%N2;
cout << res ;
break;
default : cout<<"Invalid operation..Try again !";
break;
}
} while(ch!='X' || ch!='x');
return 0 ;
}
