#include <iostream>
using namespace std;
int main() {
int x;
char op;
int y;
cin>>x;
cin>>op;
cin>>y;
switch (op) {
case '+': //case means if operator(op) = 'whatever the case is'
cout<<x+y<<endl; //print
break; //break statement
case '-':
cout<<x-y;
break;
case '*':
cout<<x*y;
break;
case '/':
cout<<x/y;
break;
default :
cout<<" invalid oprator";
break;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: