Create a command line calucaltor that will prompt for two numbers and an operator and will calculate the result. Handle the following operators: +, -, *, and /.

An interaction should look like this:

$ mycalc
First number: 23
Second number: 19
Operator: +
Result: 42

where the numbers 23, 19 and the operator + are typed in by the user.

Solutions