Write a math application, which will ask user to type in 3 inputs. Input1 is
an integer A, input2 is a String, input3 is an integer B. Once the user type in the 3 integers, the
calculator should calculate and print out the result based on the follow cases:
If input2 = “Plus”, result = A+B
If input2 = “Multiply”, result =A*A
If input2 = “Minus”, result =A/B
In this question, you only consider integers on input and output. No double, or float number type
need to be considered. (hint: switch)
For example, this application should have following process:
Please enter your 3 inputs:
? 1
? Plus
? 2
Results is: 3
Please enter your 3 inputs:
? 2
? Multiple
? 5
Results is: 10
Answers
Status NEW
Posted 19 May 2017 03:05 AM
My Price 8.00
-----------
Not Rated(0)