Question
In this assignment, you will create a very particular calculator that works with 3 integer numbers at a time rather than the usual 2 in
In this assignment, you will create a very particular calculator that works with 3 integer numbers at a time rather than the usual 2 in regular calculators. The calculator is also particular in that the desired operation is provided ahead of the numbers:
1. So, first, ask the user to enter the desired operation (use cin) and store the value in a variable named operation. The user input will consist of a single letter or symbol. Entering:
a) a or A gives the average (shown as a fractional number)
b) 'M' gives the largest number
c) 'c' or 'C' gives the middle number
d) 'o' or 'O' gives the count of how many of the three numbers are even
e) 'p' or 'P' tests whether any of the 3 numbers is divisible by 2, 3 and 5
f) 'e' or 'E' tests whether all of the 3 numbers are different
g) 's', 'S' or '+' tests whether the sum of any 2 numbers adds to the 3rd one
h) m gives the sum of all numbers between the first and second number with a step increment given by the third number (see example below).
I am trying to figure out how to do 'H', the sum of all numbers between the first and second, with the third being a step increment. This is in c++!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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