Write a program for conversion of money from one currency into another. It has to support the following currencies: BGN, USD, EUR, GBP. Use the following fixed currency rates:
Rate | USD | EUR | GBP |
---|---|---|---|
1 BGN | 1.79549 | 1.95583 | 2.53405 |
The input is sum for conversion, input currency and output currency. The output is one number – the converted value of the above currency rates, rounded 2 digits after the decimal point.
Input | Output |
---|---|
20 USD BGN |
35.91 BGN |
100 BGN EUR |
51.13 EUR |
12.35 EUR GBP |
9.53 GBP |
150.35 USD EUR |
138.02 EUR |
Test your solution here: https://judge.softuni.org/Contests/Practice/Index/504#11.