Advertisement
ZuRi4i

Untitled

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