Advertisement
spasnikolov131

Untitled

Apr 5th, 2022
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Best_Player
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string championship = Console.ReadLine();
  10. string ticketType = Console.ReadLine();
  11. int ticketCount = int.Parse(Console.ReadLine());
  12. string picture = Console.ReadLine();
  13. double price = 0;
  14.  
  15. switch (championship)
  16. {
  17. case "Quarter final":
  18. if (ticketType == "Standard")
  19. {
  20. price = 55.50;
  21. price *= ticketCount;
  22. }
  23. if (ticketType == "Premium")
  24. {
  25. price = 105.20;
  26. price *= ticketCount;
  27. }
  28. if (ticketType == "VIP")
  29. {
  30. price = 118.90;
  31. price *= ticketCount;
  32. }
  33. break;
  34.  
  35. case "Semi final":
  36. if (ticketType == "Standard")
  37. {
  38. price = 75.88;
  39. price *= ticketCount;
  40. }
  41. if (ticketType == "Premium")
  42. {
  43. price = 125.22;
  44. price *= ticketCount;
  45. }
  46. if (ticketType == "VIP")
  47. {
  48. price = 300.40;
  49. price *= ticketCount;
  50. }
  51. break;
  52.  
  53. case "Final":
  54. if (ticketType == "Standard")
  55. {
  56. price = 110.10;
  57. price *= ticketCount;
  58. }
  59. if (ticketType == "Premium")
  60. {
  61. price = 160.66;
  62. price *= ticketCount;
  63. }
  64. if (ticketType == "VIP")
  65. {
  66. price = 400;
  67. price *= ticketCount;
  68. }
  69. break;
  70. }
  71.  
  72. if (price >= 4000)
  73. {
  74.  
  75. price = (price - price * 0.25);
  76.  
  77. }
  78. else if (price >= 2500)
  79. {
  80. price = (price - price * 0.10);
  81. }
  82. if (picture == "Y" || ticketCount >= 25)
  83. {
  84. ticketCount *= 40;
  85. price += ticketCount;
  86. }
  87. else
  88. {
  89.  
  90. }
  91.  
  92. Console.WriteLine($"{price:f2}");
  93. }
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement