Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _12.Currency_Converter
- {
- class Program
- {
- static void Main(string[] args)
- {
- var amountToConvert = double.Parse(Console.ReadLine());
- var inputCurrency = Console.ReadLine();
- var OutputCurrency = Console.ReadLine();
- var USDtoBGN = amountToConvert * 1.79549;
- var BGNtoEUR = amountToConvert / 1.95583;
- var EURtoGBP = amountToConvert * 0.771659919;
- var USDtoEUR = amountToConvert * 0.917991;
- var GBPtoUSD = amountToConvert * 1.411;
- if (inputCurrency == "USD")
- if (OutputCurrency == "BGN")
- {
- Console.WriteLine(Math.Round(USDtoBGN, 2) + " BGN");
- }
- if (inputCurrency == "BGN")
- {
- Console.WriteLine(Math.Round(BGNtoEUR, 2) + " EUR");
- }
- if (inputCurrency == "EUR")
- {
- Console.WriteLine(Math.Round(EURtoGBP, 2) + " GBP");
- }
- if (inputCurrency == "USD")
- if (OutputCurrency == "EUR")
- {
- Console.WriteLine(Math.Round(USDtoEUR, 2) + " EUR");
- }
- if (inputCurrency == "GBP")
- if (OutputCurrency == "USD")
- {
- Console.WriteLine(Math.Round(GBPtoUSD, 2) + " USD");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement