Question: write a calculator program in c++. The calculator will allow the user to perform the following operations(please follow instruction below) writ a program to Get
write a calculator program in c++. The calculator will allow the user to perform the following operations(please follow instruction below)
writ a program to Get the area of a square
writ a program to Get the exponent of 2 integers
writ a program to Get the quotient of 2 integers
Get the real division of 2 integers
Get the remainder of 2 integers
Multiplication
Subtraction
Additiorn
Convert from decimal to bases 2-16
Get Factorial
Find out if an integer is even or odd
Get the area of a circle
Get the area of a right lisosceles triangle
ALL of these operations MUST be done in separate functions (i.e. NOT in the main function) You must present the options to the user (also in a separate function). One of the options in the menu must be the option to quit. If that is the option, the program must end as soon as it returns to the main function. If that is n must determine if the user has made a legal option (i.e. one on the menu). If they entered an illegal option, you must n ntered an illegal option, you must notify the user that it is an illegal choice, redisplay the menu, and get the user r's new choice. The user cannot leave the menu function until they enter a legal option (The user's choice to quit is a legal option). When a legal choice is entere choice must be returned to the main function When the user's choice is returned to the main function the first thing you must determine is whether the user wants to quit, if so, quit (the main funct tion should return a value, so you can return that value). Otherwise, you must determine how many parameters must be passed to the required function. Some require only 1 integer (conversions, factorial , and the area of a circle or square) the others require 2 (all of the user's choices must be integers) t use any global variables (except for the assignment of the output file name). About half the external You may not use any global variables (except for the assignment of the o functions must return the result of the operations the function). Your program must print out the result presented as a loop. until the user decides to quit. the remaining operations can be printed in s to the console and to an external file. Your main function must be Once it completes the operation, it must again present the menu and perform all of the operations,
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
