anonymous
2011-04-06 10:46:48 UTC
calculator. The program should request the user to enter a number, an operator
(data type - char), and another number. It should then carry out the specified
arithmetic operation: adding, subtracting, multiplying, or dividing the two numbers.
(Hint: use a switch statement to select the operation). For division, if the
denominator is zero, output an appropriate message.
Finally, the program should display the result in an algebraic equation format.
For examples,
num operation num = answer
5 + 6 = 11
12 / 3 = 4