Advertisement
PavelSlavov

Untitled

Jan 19th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 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 Convertor1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var sum = double.Parse(Console.ReadLine());
  14. var entry = Console.ReadLine();
  15. var exit = Console.ReadLine();
  16.  
  17. var result0 = sum * 1.79549;
  18. var result1 = sum / 1.79549;
  19. var result2 = sum * 1.95583;
  20. var result3 = sum / 1.95583;
  21. var result4 = sum * 2.53405;
  22. var result5 = sum / 2.53405;
  23. var result6 = sum * (1.95583 / 1.79549);
  24. var result7 = sum * (1.79549 / 1.95583);
  25. var result8 = sum * (1.95583 / 2.53405);
  26. var result9 = sum * (2.53405 / 1.95583);
  27. var result10 = sum * (1.79549 / 2.53405);
  28. var result11 = sum * (2.53405 / 1.79549);
  29.  
  30.  
  31. if (entry == "USD")
  32. {
  33. if (exit == "BGN")
  34. Console.WriteLine(" :" + Math.Round(result0, 2));
  35. }
  36. else if (entry == "BGN")
  37. {
  38. if (exit == "USD")
  39. Console.WriteLine(":" + Math.Round(result1, 2));
  40. }
  41.  
  42. if (entry == "EUR")
  43.  
  44. {
  45. if (exit == "BGN")
  46. Console.WriteLine(":" + Math.Round(result2, 2));
  47. }
  48. else if (entry == "BGN")
  49. {
  50. if (exit == "EUR")
  51. Console.WriteLine(":" + Math.Round(result3, 2));
  52. }
  53. if (entry == "GBP")
  54. {
  55. if (exit == "BGN")
  56. Console.WriteLine(":" + Math.Round(result4, 2));
  57. }
  58.  
  59. else if (entry == "BGN")
  60. {
  61. if (exit == "GBP")
  62. Console.WriteLine(":" + Math.Round(result5, 2));
  63. }
  64. if (entry == "EUR")
  65. {
  66. if (exit == "USD")
  67. Console.WriteLine(" :" + Math.Round(result6, 2));
  68. }
  69. else if (entry == "USD")
  70. {
  71. if (exit == "EUR")
  72. Console.WriteLine(":" + Math.Round(result7, 2));
  73. }
  74.  
  75. if (entry == "EUR")
  76.  
  77. {
  78. if (exit == "GBP")
  79. Console.WriteLine(":" + Math.Round(result8, 2));
  80. }
  81. else if (entry == "GBP")
  82. {
  83. if (exit == "EUR")
  84. Console.WriteLine(":" + Math.Round(result9, 2));
  85. }
  86. if (entry == "USD")
  87. {
  88. if (exit == "GBP")
  89. Console.WriteLine(":" + Math.Round(result10, 2));
  90. }
  91.  
  92. else if (entry == "GBP")
  93. {
  94. if (exit == "USD")
  95. Console.WriteLine(":" + Math.Round(result11, 2));
  96. }
  97. }
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement