Write a program which will work as an arithmetic calculator. The program should prompt the user to enter the arithmetic operation that would like to perform, request two real numbers and print the result.
The program should be able to perform the following arithmetic operations, depending on the character that the user enters:
‘+’ Addition
‘-‘ Subtraction [Subtract the first from the second number, entered by the user]
‘*’ Multiplication
‘/’ Division [Divide the first by the second number, entered by the user].
As part of the solution a function should be developed which will take the following three parameters:
1. The character of the arithmetic operation to be performed
2. The first number to be used by the selected arithmetic operation
3. The second number to be used by the selected arithmetic operation
Hint: The program should validate the second number in this case. Division by zero is not allowed. In such a case the program should display a warning message to the user and ask him/her to retype a valid second number.
For this exercise use the CASE statement