For this assignment, you must make a calculator, but expanding it to include the following: The user should choose the operation by entering a number, or exiting the application if they enter 0. If...

For this assignment, you must make a calculator, but expanding it to include the following:

The user should choose the operation by entering a number, or exiting the application if they enter 0. If the number is outside of the options given, the program asks them again. Only if the option is accepted should the calculator ask for tworealnumbers.


The calculator should be able to do the following operations:


Addition


Subtraction


Division


Multiplication


Power the first number by the second using loops. You are not allowed to use math.h or similar libraries for this.


Print theGreatest Common Divisorbetween two numbers (this is the highest number both can be divided by, do not confuse by the GreatestPrimeDivisor that you did for last assignment) using loops. You are not allowed to use math.h or similar libraries for this.


It should display only the result of the operation requested.


After every operation, the program should ask the user if they wanna do another. If they enter y or Y, the cycle repeats; if they enter n or N, the program closes; if they enter anything else the program asks them again.


You are allowed to recycle as much code from previous assignments as you wish.When you're done, submit the .cpp file with your code, along a screenshot of your calculator with the following results:


37 32


87 - 33


23 * 22


18 / 0


378 / 500


2 to the power of 8


3 to the power of -3


Greatest common divisor of 299 and 97


Greatest common divisor of -299 and 97





May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here