Write a simple C++ program that performs addition, subtraction, multiplication,
ID: 3621706 • Letter: W
Question
Write a simple C++ program that performs addition, subtraction, multiplication, division, exponentiation, base-10 logarithm, and factorial operations. The program should start with a menu letting the user to choose one of the eight operations the user wants to perform. A sample menu is given below (hint: use loop to calculate more than once, use functions for each operation):
Enter:
+ for the addition operation
- for the subtraction operation
* for the multiplication operation
/ for the division operation
^ for the exponentiation operation
l for the base-10 logarithm operation
! for the factorial operation and
q to quit.
After an operation is chosen, the program will ask the user to input operands (there will be only one operand for logarithm and factorial operations).