Advertisement
slls1

Untitled

Jan 23rd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 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 Currency_Converter
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double sum = double.Parse(Console.ReadLine());
  14.             string inCurrance = Console.ReadLine();
  15.             string outCurrance = Console.ReadLine();
  16.  
  17.             if (inCurrance == "BGN")
  18.             {
  19.                 if (outCurrance == "EUR")
  20.                 {
  21.                     double bank = sum * 1.95583;
  22.                     Console.WriteLine("You hava " + Math.Round(bank, 2) + " leva");
  23.                 }
  24.                 if (outCurrance == "USD")
  25.                 {
  26.                     double bank2 = sum * 1.79549;
  27.                     Console.WriteLine("You have " + Math.Round(bank2, 2) + " leva");
  28.                 }
  29.  
  30.                 if (outCurrance == "GBR")
  31.                 {
  32.                     double bank3 = sum * 2.53405;
  33.                     Console.WriteLine("You have " + Math.Round(bank3, 2) + " leva");
  34.                 }
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement