Advertisement
Guest User

Untitled

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