The purpose of this lab is to create a calculator program that allows the user to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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: ctt 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 program should compute the result and display it on the screen. If the user 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. 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: 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: ctt 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 program should compute the result and display it on the screen. If the user 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. 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:
Expert Answer:
Related Book For
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel
Posted Date:
Students also viewed these computer network questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In this question assume that p and q are atomic formulae. (a) Compare and contrast path formulae and state formulae in temporal logic. [4 marks] (b) Describe and contrast the meanings of F(G p) and...
-
Write a report on Home and Automobile: These are two of the most important financial purchases we will make. These decisions, especially housing, will affect much of your ability to meet your...
-
Calvin Albright is 69 years old and married. He and his wife, Betty, are both U.S. citizens with valid Social Security numbers. Calvin retired in 2015. He received $7,000 in Social Security payments...
-
Assume you have been given the following information on Purcell Industries: Current stock price = $15........................,,,,,..Exercise price of option = $15 Time to maturity of option = 6...
-
Below are the financial statements for two entertainment firms, Crosby Co. and Prairie Inc. for 2017 and 2018 a. How did Crosby Co.s profit margins change from 2017 to 2018? To what would you...
-
Sharp Screen Films, Inc., is developing its annual financial statements at December 31, 2015. The statements are complete except for the statement of cash flows. The completed comparative balance...
-
Question 2 Abantu Ltd, a textile manufacturing company in Bungoma, recently introduced a compensation programme for its employees. As a human resource specialist, explain what prompted the firm to...
-
Prevosti Farms and Sugarhouse pays its employees according to their job classification. The following employees make up Sugarhouse's staff: Employee Number Name and Address Payroll information...
-
Consider a system of two Ising spins s, & Sz taking values II with internal energy E = -JS S leltiti's in thermal equilibrium at temp. I. The ave. en. varies as CIK&T for large T. then C varies as -...
-
Why should content development be distributed through a large organisation?
-
How can customer concerns about privacy be responded to when conducting one-to-one marketing using the Internet?
-
Why should service firms focus their efforts? Describe the basic focus strategies and give examples of how these work.
-
Explain why integration between online and traditional media will make a campaign more effective overall.
-
Explain the benefits to businesses of creating virtual communities and how such communities can be used as part of relationship marketing.
-
The following data, presented in alphabetical order, are taken from the records of Sandhill Corporation. Accounts payable $241,000 Accounts receivable 139,500 Accumulated depreciationbuildings...
-
Carlton Stokes owns and operates a car-detailing business named SuperShine & Detailing. For $150, Carltons business will hand wash and wax customers cars, vacuum the interior, and thoroughly clean...
-
Examine the CASE tools, ERWin, and Oracle/Designer, and discuss the ER modeling grammar supported by each of them.
-
Display the sum along with a three month moving average of the production of milk across the regions of the 2006-2010 period starting with January, 2006 and ending in December, 2010?
-
What complicates the mapping of 1:1 cardinality ratios?
-
Under an evolutionary classification system, species are grouped together based on (a) their shared similarities. (b) how closely related they are to one another. (c) their position in a hierarchy...
-
What criteria are used to classify species in the Linnaean system?
-
The scientific name of a species (a) consists of two parts, the family name and the species name. (b) is always underlined. (c) is always in Latin. (d) includes only the species name.
Study smarter with the SolutionInn App