Ethan H.

asked • 02/17/21

Please make as simple as possible Write a program that mimics a calculator.

The program should take as input integers based on the operation and input the operation to be performed. It should then output the numbers, the operator, and the result of the operation. (for division, if the numerator or denominator is zero, output an appropriate message, indicating this operation is not valid and end program.). Must show a menu to the user indicating what type of arithmetic to perform (add, subtract, divide, multiply, modulus, power of, square root.

  1. Output example Eg. 3 + 4 = 7 or 13 * 5 = 65
  2. menu example: 
  3.  Pick One
  4. a = add
  5. s = subtract
  6. d = divide
  7. m = multiply
  8. p = power of
  9. sq = square root
  10. md = modulus


1 Expert Answer

By:

Patrick B. answered • 02/18/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.