Question: Number Calculator: Using C++, create a calculator program. This program takes two numbers and one operation from the user and performs the operation on the

Number Calculator: Using C++, create a calculator program. This program takes two numbers and one operation from the user and performs the operation on the two numbers. The user should be able to type in the numbers as either "one", "two", "three", "four", or "five". The operation should be either "add", "sub", "mul", or "div", representing addition, subtraction, multiplication, and division respectively. The program should then calculate the result and print it out to the console. The program should also be recursive, meaning when the calculation is done it should start the program from the beginning. See the example below:

Shape Area Calculator: Using C++, create a program that calculates the area of shapes. The program should prompt the user to type in a shape, and depending on the shape, the user should be prompted to type in the relevant measurements. Then, the program should calculate the area of the shape and output the result. Your program should account for circles, triangles, and rectangles. The program should use the pow() function and M_PI constant in the math.h library to calculate the area of a circle, and use basic math to calculate the area of a triangle and rectangle. Finally, the program should repeat itself after it finishes the calculations. When calculating powers use the pow() function in math.h library.

CLI

Combine the two problems Number Calculator and Shape Area Calculator into a single application. Create a menu for the user to select the calculator type. Also provides error checking for inputted values. The application should accept correct values with leading and trailing blank characters example, two\t is still equal to two. If the user makes three consecutive errors at any point, exit the application with a non-zero status code. Use functions and while loops for error checking and repeating input prompts.

In the main menu, shape is the command the user will type to access the space calculator. calc is the command the user will type to access the word calculator. quit is the command the user will type to exit the program.

The quit command will exit the program with a 0 status code.

Submit the source code function in a file named functions_calculator.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!