C++ programing

Instructions

Write a program that mimics a calculator. The program should take as input:

  1. Two floating-point numbers
  2. The operation to be performed.

It should then output the numbers, the operator, and the result.

Additional notes:

  • Format your output to two decimal places.
  • For division, if the denominator is zero, output an appropriate message. The message should contain the word “error

Some sample outputs follow:

 

3.5 + 4.0 = 7.50
13.973 * 5.65 = 78.95
Order from us and get better grades. We are the service you have been looking for.