//write a program that enter two number and the sign and the output is sum or
subst or multi or divide according to sign hint (use switch )
Input : 1 + 2
Output :3
Input : 3 * 3
Output : 9 use switch
1
Expert's answer
2013-01-24T07:35:33-0500
#include <conio.h> #include <iostream>
using namespace std;
void main() { int a, b; char sign; int result;
cout << "Enter an expression: "; cin >> a >> sign >> b;
Comments
Leave a comment