Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace WorldSnookerChampionship
- {
- class Program
- {
- static void Main()
- {
- string stageOfTheChampionship = Console.ReadLine();
- string typesOfTickets = Console.ReadLine();
- int ticketCount = int.Parse(Console.ReadLine());
- string selfieWithTheTrophy = Console.ReadLine();
- double ticketPrice = 0;
- if (stageOfTheChampionship == "Quarter final")
- {
- if (typesOfTickets == "Standard")
- {
- ticketPrice = 55.50;
- }
- else if (typesOfTickets == "Premium")
- {
- ticketPrice = 105.20;
- }
- else if(typesOfTickets == "VIP")
- {
- ticketPrice = 118.90;
- }
- }
- else if (stageOfTheChampionship == "Semi final")
- {
- if (typesOfTickets == "Standard")
- {
- ticketPrice = 75.88;
- }
- else if (typesOfTickets == "Premium")
- {
- ticketPrice = 125.22;
- }
- else if (typesOfTickets == "VIP")
- {
- ticketPrice = 300.40;
- }
- }
- else if (stageOfTheChampionship == "Final")
- {
- if (typesOfTickets == "Standard")
- {
- ticketPrice = 110.10;
- }
- else if (typesOfTickets == "Premium")
- {
- ticketPrice = 160.66;
- }
- else if (typesOfTickets == "VIP")
- {
- ticketPrice = 400;
- }
- }
- double totalPrice = ticketPrice * ticketCount;
- if (totalPrice > 4000)
- {
- totalPrice *= 0.75;
- selfieWithTheTrophy = "N";
- }
- else if (totalPrice > 2500)
- {
- totalPrice *= 0.9;
- }
- if (selfieWithTheTrophy == "Y")
- {
- totalPrice += ticketCount * 40;
- }
- Console.WriteLine($"{totalPrice:f2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment