Write a program consisting of two files: calculations.h calculator.cpp The file calculations.h contains the instructions to do six different things: a) Add two numbers together
Write a program consisting of two files:
calculations.h
calculator.cpp
The file calculations.h contains the instructions to do six different things:
a) Add two numbers together
b) Subtract one number from another
c) Multiply two numbers together
d) Divide one number by another
e) Square a number
f) Find the average of a set of numbers between 1 and 5 (use default arguments)
The file calculator.cpp will provide a menu for a user such that the following sample output is produced, with the underlined characters the result of user input:
This program is a multi-function calculator.
Select your operation from the list below (and type q to quit):
1) Addition 2) Subtraction
3) Multiplication 4) Division
5) Squaring 6) Averaging
Operation: 2
Enter the first number: 5
Enter the second number: 3
Result: 2
Select your operation from the list below (and type q to quit):
1) Addition 2) Subtraction
3) Multiplication 4) Division
5) Squaring 6) Averaging
Operation: 5
Enter the number: 4
Result: 16
Select your operation from the list below (and type q to quit):
1) Addition 2) Subtraction
3) Multiplication 4) Division
5) Squaring 6) Averaging
Operation: 6
Enter the size of your data set: 3
Enter number 1: 5
Enter number 2: 5
Enter number 3: 5
Result: 5
Select your operation from the list below (and type q to quit):
1) Addition 2) Subtraction
3) Multiplication 4) Division
5) Squaring 6) Averaging
Operation: q
Press any key to return to Quincy
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started