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 Конзолен_конвертор_USD_към_BGN
- {
- class Program
- {
- static void Main(string[] args)
- {
- var num = double.Parse(Console.ReadLine());
- var first = Console.ReadLine();
- var second = Console.ReadLine();
- if (first == "BGN")
- {
- if (second == "USD")
- Console.WriteLine( Math.Round(num / 1.79549, 2));
- else if (second == "EUR")
- Console.WriteLine( Math.Round(num / 1.95583, 2));
- else if (second == "GBP")
- Console.WriteLine( Math.Round(num / 2.53405, 2));
- }
- if (first == "USD")
- {
- if (second == "BGN")
- Console.WriteLine(Math.Round(num * 1.79549, 2));
- else if (second == "EUR")
- Console.WriteLine(Math.Round(num * 1.79549 / 1.95583, 2));
- else if (second == "GBP")
- Console.WriteLine(Math.Round(num * 1.79549 / 2.53405, 2));
- }
- if (first == "GBP")
- {
- if (second == "BGN")
- Console.WriteLine(Math.Round(num * 2.53405 , 2));
- else if (second == "USD")
- Console.WriteLine(Math.Round(num * 2.53405 / 1.79549, 2));
- else if (second == "EUR")
- Console.WriteLine(Math.Round(num * 2.53405 / 1.95583 , 2));
- }
- if (first == "EUR")
- {
- if (second == "BGN")
- Console.WriteLine(Math.Round(num * 1.95583, 2));
- else if (second == "USD")
- Console.WriteLine(Math.Round(num * 1.95583 / 1.79549, 2));
- else if (second == "GBP")
- Console.WriteLine(Math.Round(num * 1.95583 / 2.53405, 2));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement