Question: Modify the mini calculator from exercise 5 to accept (just) single-digit numbers written as either digits or spelled out. Data from Exercise 5 Write a

Modify the “mini calculator” from exercise 5 to accept (just) single-digit numbers written as either digits or spelled out.


Data from Exercise 5

Write a program that performs as a very simple calculator. Your calculator should be able to handle the four basic math operations — add, subtract, multiply, and divide — on two input values. Your program should prompt the user to enter three arguments: two double values and a character to represent an operation. If the entry arguments are 35.6, 24.1, and '+', the program output should be The sum of 35.6 and 24.1 is 59.7. In Chapter 6 we look at a much more sophisticated simple calculator.

Step by Step Solution

3.37 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

note that different compilersSDEs keep header files in different places so that you may have to use stdlibfacilitiesh or stdlibfacilitiesh the notatio... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Principles and Practice Questions!