Answer: Provided in the explanation section
Step-by-step explanation:
provided below is the program to carry out this task, i hope it provides clarity.
#include <iostream>
using namespace std;
int main() {
int n1, n2;
char ch;
cout << "Enter an expression" << endl;
cin >> n1 >> ch >> n2;
switch(ch) {
case '+':
cout << "The sum is " << n1+n2 << endl;
break;
case '-':
cout << "The difference is " << n1-n2 << endl;
break;
case '*':
cout << "The product is " << n1*n2 << endl;
break;
case '/':
cout << "The division is " << n1/n2 << endl;
break;
default:
cout << "Invalid expression" << endl;
}
return 0;
cheers i hope this helped !!
}