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 SoftUni
- {
- class Program
- {
- static void Main(string[] args)
- {
- double value = double.Parse(Console.ReadLine());
- string from = Console.ReadLine();
- string to = Console.ReadLine();
- double x = 0;
- double y = 0;
- switch(from)
- {
- case "BGN": x = 1; break;
- case "USD": x = 1.79549; break;
- case "EUR": x = 1.95583; break;
- case "GBP": x = 2.53405; break;
- }
- switch (to)
- {
- case "BGN": y = 1; break;
- case "USD": y = 1.79549; break;
- case "EUR": y = 1.95583; break;
- case "GBP": y = 2.53405; break;
- }
- Console.Write(Math.Round((value*x)/y,2) + " " + to);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement