Question: In this problem, you are required to use for loop only to implement a calculator using ++ (increment) and -- (decrement) operators only. The operations
In this problem, you are required to use for loop only to implement a calculator using ++ (increment) and -- (decrement) operators only. The operations that your calculator shall perform are limited, i.e. addition, subtraction, multiplication, division, and remainder. Your program shall ask the user about the two input values and an operator, and then use the switch-case structure to run the required operation (addition, subtraction, multiplication, or division). Your program shall run correctly for positive input values only.
First Input: 10
Second Input: 12
Operation: Addition
Step by Step Solution
3.37 Rating (147 Votes )
There are 3 Steps involved in it
To solve the problem of implementing a calculator with only the use of increment and decrement opera... View full answer
Get step-by-step solutions from verified subject matter experts
