Write a program to display a calculator menu. The program will prompt the user to choose the operation (from 1 to 5). Then it asks the user to input two values for the calculations. See the sample output 1 below. MENU =====-= 1. Add 2.Subtract 3. Multiply 4.Divide 5. Modulus Enter your choice(1-5):2 Enter your two integer numbers:2 4 Result : -2 Continue: y Enter your choice(1-5):1 Enter your two integer numbers:3 5 Result : 8 Continue: n Press any key to continue . ..I Sample output 1 The program also asks the user to decide whether he/she wants to continue operation. If he/she input 'y', the program will prompt the user to choose the operation again. Otherwise, the program will terminate. You have to use the following user-defined functions in your program. int Add (int a,int b); int Substract(int a, int b); int Multiply(int a, int b); float Divide (int a, int b); int Modulus (int a, int b);
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.
***please use C++
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images