grigorb57

Currency Converter

Jan 17th, 2018
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 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 ConsoleApp4
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. Console.WriteLine("USD to BGN");
  15. Console.Write("Enter sum equal to USD: ");
  16. double USD = double.Parse(Console.ReadLine());
  17. double USDTOBGN = 1.79549;
  18. double Conversion = USDTOBGN * USD;
  19. Console.Write("Your sum is exchanged in BGN: ");
  20. Console.WriteLine(Math.Round(Conversion, 2) + " BGN");
  21.  
  22. Console.WriteLine("_______________________________________");
  23.  
  24. Console.WriteLine("BGN to EUR");
  25. Console.Write("Enter sum equal to BGN: ");
  26. double BGN2 = double.Parse(Console.ReadLine());
  27. double bgnToEur = 0.511291881196218;
  28. double Conversion2 = BGN2 * bgnToEur;
  29. Console.Write("Your sum is exchanged in EUR: ");
  30. Console.WriteLine(Math.Round(Conversion2, 2) + " EUR");
  31.  
  32. Console.WriteLine("_______________________________________");
  33.  
  34. Console.WriteLine("EUR to GBP");
  35. Console.Write("Enter sum equal to EUR: ");
  36. double EUR = double.Parse(Console.ReadLine());
  37. double EURTOGBP = 0.7718198141315286;
  38. double Conversion3 = EUR * EURTOGBP;
  39. Console.Write("Your sum is exchanged in GBP: ");
  40. Console.WriteLine(Math.Round(Conversion3, 2) + " GBP");
  41.  
  42. Console.WriteLine("_______________________________________");
  43.  
  44. Console.WriteLine("USD to EUR");
  45. Console.Write("Enter sum equal to USD: ");
  46. double USD2 = double.Parse(Console.ReadLine());
  47. double USDTOEUR = 0.9180194597689983;
  48. double Conversion4 = USD2 * USDTOEUR;
  49. Console.Write("Your sum is exchanged in EUR: ");
  50. Console.WriteLine(Math.Round(Conversion4, 2) + " EUR");
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment