Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.66 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp5
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var value = double.Parse(Console.ReadLine());
  14.             var currency = Console.ReadLine();
  15.             var Secondcurrency = Console.ReadLine();
  16.             double BGN, EUR, USD, GBR;
  17.             while (currency == "BGN") ;
  18.  
  19.             if (Secondcurrency == "EUR")
  20.             { EUR = value / 1.95583;
  21.                 Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency); }
  22.  
  23.             if (Secondcurrency == "USD")
  24.             { USD = value / 2.53405;
  25.                 Console.WriteLine("{0}{1}", Math.Round(USD, 2), Secondcurrency); }
  26.  
  27.             if (Secondcurrency == "GBR")
  28.             { GBR = value / 2.53405;
  29.                 Console.WriteLine("{0}{1}", Math.Round(GBR, 2), Secondcurrency); }
  30.  
  31.  
  32.             while (currency == "USD") ;
  33.             { if (Secondcurrency == "BGN") ;
  34.                 BGN = value * 2.53405;
  35.                 Console.WriteLine("{0}{1}", Math.Round(BGN, 2), Secondcurrency); }
  36.  
  37.             { if (Secondcurrency == "EUR") ;
  38.                 EUR = value * 2.53405 / 1.95583;
  39.                 Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency); }
  40.             { if (Secondcurrency == "GBR") ;
  41.                 GBR = value * 2.53405 / 2.53405;
  42.                 Console.WriteLine("{0}{1}", Math.Round(GBR, 2), Secondcurrency); }
  43.  
  44.  
  45.             while (currency == "GBR") ;
  46.             { if (Secondcurrency == "EUR") ;
  47.                 EUR = value * 2.53405 / 1.95583;
  48.                 Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency); }
  49.             { if (Secondcurrency == "BGN") ;
  50.                 BGN = value * 2.53405;
  51.                 Console.WriteLine("{0}{1}", Math.Round(BGN, 2), Secondcurrency); }
  52.             { if (Secondcurrency == "USD") ;
  53.                 USD = value * 2.53405 / 2.53405;
  54.                 Console.WriteLine("{0}{1}", Math.Round(USD, 2), Secondcurrency); }
  55.  
  56.  
  57.             while (currency == "EUR") ;
  58.             {   if (Secondcurrency == "GBR") ;
  59.                 GBR = value * 1.95583 / 2.53405;
  60.                 Console.WriteLine("{0}{1}", Math.Round(EUR, 2), Secondcurrency);}
  61.  
  62.             {   if (Secondcurrency == "BGN") ;
  63.                 BGN = value * 1.95583;
  64.                 Console.WriteLine("{0}{1}", Math.Round(BGN, 2), Secondcurrency);}
  65.  
  66.             {   if (Secondcurrency == "USD") ;
  67.                 USD = value * 1.95583 / 2.53405;
  68.                 Console.WriteLine("{0}{1}", Math.Round(USD, 2), Secondcurrency);}
  69.         }
  70.     }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement