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 ConsoleApp5
- {
- class Program
- {
- static void Main(string[] args)
- {
- var value = double.Parse(Console.ReadLine());
- var currency = Console.ReadLine();
- var Secondcurrency = Console.ReadLine();
- double BGN, EUR, USD, GBR;
- while (currency == "BGN") ;
- if (Secondcurrency == "EUR")
- { EUR = value / 1.95583;
- Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency); }
- if (Secondcurrency == "USD")
- { USD = value / 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(USD, 2), Secondcurrency); }
- if (Secondcurrency == "GBR")
- { GBR = value / 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(GBR, 2), Secondcurrency); }
- while (currency == "USD") ;
- { if (Secondcurrency == "BGN") ;
- BGN = value * 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(BGN, 2), Secondcurrency); }
- { if (Secondcurrency == "EUR") ;
- EUR = value * 2.53405 / 1.95583;
- Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency); }
- { if (Secondcurrency == "GBR") ;
- GBR = value * 2.53405 / 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(GBR, 2), Secondcurrency); }
- while (currency == "GBR") ;
- { if (Secondcurrency == "EUR") ;
- EUR = value * 2.53405 / 1.95583;
- Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency); }
- { if (Secondcurrency == "BGN") ;
- BGN = value * 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(BGN, 2), Secondcurrency); }
- { if (Secondcurrency == "USD") ;
- USD = value * 2.53405 / 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(USD, 2), Secondcurrency); }
- while (currency == "EUR") ;
- { if (Secondcurrency == "GBR") ;
- GBR = value * 1.95583 / 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency);}
- { if (Secondcurrency == "BGN") ;
- BGN = value * 1.95583;
- Console.WriteLine("{0}{1}", Math.Round(BGN, 2), Secondcurrency);}
- { if (Secondcurrency == "USD") ;
- USD = value * 1.95583 / 2.53405;
- Console.WriteLine("{0}{1}", Math.Round(USD, 2), Secondcurrency);}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement