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