#include
using namespace std;
int main() {
char ch;
cin>>ch;
do
switch(ch)
{
case β+β:{
int a,b;
cin>>a>>b;
a=a+b;
cin>>a;
break;
}
case β-β:{
int a,b;
cin>>a>>b;
a=a-b;
cout<<a;
break;
}
case 'β:{
int a,b;
cin>>a>>b;
a=ab;
cout<<a;
break;
}
case β/β:{
int a,b;
cin>>a>>b;
a=a/b;
cout<<a;
break;
}
default :
cout<<βInvalid operation. Try again.β;
}while(ch!=βxβ && ch!=βXβ);
return 0;
}
Where i am doing wrong in a basi c caluclaaaator question
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.