1. Engineering
  2. Computer Science
  3. objective the purpose of this lab is to create a...

Question: objective the purpose of this lab is to create a...

Question details

Objective: The purpose of this lab is to create a calculator program that allows the user to perform a variety of mathematical operations. The mathematical operations your calculator needs to perform are: a) Addition using the symbol+ b) Subtraction using the symbol c) Multiplication using the symbol* d) Division using the symbol / e) Power using the symbol ^ f) Modulus using the symbol % We have not discussed the power (i.e. pow) function (i.e. part e above) in class, you can look it up on Google. Your calculator should allow the user to enter information in a single line using the following format: Number1 Operation Number2 In other words, the user will enter everything in a single line and then presses Enter. Once the user presses Enter your pro provides a symbol for Operation that you do not recognize, you should display an error message You may need to perform error checking for some of the operations to make sure you get the correct result, for example making sure the denominator in divide is not equal to 0 gram should compute the result and display it on the screen. If the user Submitting your program Your program should be called lab3.cpp and once you have verified that it compiles without errors or warnings and runs correctly you can submit it as follows
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution