CMSC 201

Lab 8: Practice

Welcome to lab!

Today we will create a calculator program that takes in two numbers and does a mathematical operation dictated by the user. The program should use functions to do any and all calculations as requested by the user. Separate functions should be created for each mathematical operation, and those mathematical operations include addition, subtraction, division, multiplication, and an extra point may be given if the student can use the math library to implement square root.

Sample Output:

Hello! Welcome to CalculatorBot 9000! Please enter the mathematical symbol that you want to use based on the menu of options (without the quotes)!

Menu:
"+"
"-"
"/"
"*"


UserInput: *

You have chosen to multiply!
Please Enter the first number you want to multiply: 2
Please Enter the second number you want to multiply: 2


The Answer is: 4

If you would like to do another mathematical operation, please enter "r", else if you'd like to quit, enter "q"

What would you like to do? "q"

______________________________________________________________________________
Requirements for full credit on the lab:
A main that calls functions
A function for the menu
A function for each of the mathematical operations
You can implement the quit portion in any manner you'd like
You can take the two numbers in any way you'd like
You must calculate the desired accurate answer and return it to the user