Basic Calculator

Problem Statement
Jenan was upset that calculators are not allowed in the programming contest. She decided to make her own basic calculator. The calculator accepts three inputs:
- The first number
- The second number
- The operation (+ * / -)
For example, 1, 2 and + will output 3.0. 2, 3 and * on the other hand will print 6.0.
Help Jenan make this program and win the programming contest!
Constraints
A and B are float numbers between 1 and 100.
X is the code of the operation which can be:
+addition-subtraction*multiplication/division
Input
Input is in the following format:
A
B
X
Output
Print the result of the operation on the two numbers provided. The output must be of type float.
Samples
Sample 1
| Input | Output |
|---|---|
| 2 3 - |
-1.0 |
Sample 2
| Input | Output |
|---|---|
| 8 2 / |
4.0 |
Sample 3
| Input | Output |
|---|---|
| 50 50 + |
100.0 |
Comments