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;
- namespace Program
- {
- class Program
- {
- static void Main()
- {
- var value = double.Parse(Console.ReadLine());
- var input = Console.ReadLine();// Enter BGN, USD, EUR or GBP currency
- var output = Console.ReadLine();// Enter BGN, USD, EUR or GBP currency
- var bgn = 1.0;
- var usd = 1.81;
- var eur = 1.96;
- switch (input)
- {
- case "BGN":
- break;
- case "USD":
- value = value * usd;break;
- case "EUR":
- value = value * eur;break;
- default:break;
- }
- switch (output)
- {
- case "BGN":
- value = value / bgn;break;
- case "USD":
- value = value / usd;break;
- case "EUR":
- value = value / eur;break;
- }
- Console.WriteLine(Math.Round(value, 2) + " " + output);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement