Problem: * console currency converter

Write a program for conversion of money from one currency to another. It has to maintain the following currencies: BGN, USD, EUR, GBP. Use the following fixed currency rates:

Курс 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.

Sample Input and Output

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

Testing in the Judge System

Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/504#11.

results matching ""

    No results matching ""