Last active
February 13, 2017 13:30
-
-
Save NastySwipy/a0b92890305dfe72f8b86d529f2b612b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class ChangeBuro | |
{ | |
static void Main(string[] args) | |
{ | |
double money = double.Parse(Console.ReadLine()); | |
string currencyIn = Console.ReadLine(); | |
string currencyOut = Console.ReadLine(); | |
string currencyStr = currencyIn + currencyOut; | |
double usdTobgn = money * 1.79549; | |
double eurTobgn = money * 1.95583; | |
double gpbTobgn = money * 2.53405; | |
switch (currencyStr) | |
{ | |
case "USDBGN": | |
Console.WriteLine(Math.Round(usdTobgn, 2) + " " + currencyOut); | |
break; | |
case "BGNUSD": | |
Console.WriteLine(Math.Round(usdTobgn * 1.79549, 2) + " " + currencyOut); | |
break; | |
case "EURBGN": | |
Console.WriteLine(Math.Round(eurTobgn, 2) + " " + currencyOut); | |
break; | |
case "BGNEUR": | |
Console.WriteLine(Math.Round(money / 1.95583, 2) + " " + currencyOut); | |
break; | |
case "GBPBGN": | |
Console.WriteLine(Math.Round(gpbTobgn, 2) + " " + currencyOut); | |
break; | |
case "BGNGBP": | |
Console.WriteLine(Math.Round(gpbTobgn * 2.53405, 2) + " " + currencyOut); | |
break; | |
case "EURGBP": | |
Console.WriteLine(Math.Round(eurTobgn / 2.53405, 2) + " " + currencyOut); | |
break; | |
case "GBPEUR": | |
Console.WriteLine(Math.Round(gpbTobgn / 1.95583, 2) + " " + currencyOut); | |
break; | |
case "EURUSD": | |
Console.WriteLine(Math.Round(eurTobgn / 1.79549, 2) + " " + currencyOut); | |
break; | |
case "USDEUR": | |
Console.WriteLine(Math.Round(usdTobgn / 1.95583, 2) + " " + currencyOut); | |
break; | |
case "GBPUSD": | |
Console.WriteLine(Math.Round(gpbTobgn / 1.79549, 2) + " " + currencyOut); | |
break; | |
case "USDGBP": | |
Console.WriteLine(Math.Round(usdTobgn / 2.53405, 2) + " " + currencyOut); | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment