Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Best_Player
- {
- class Program
- {
- static void Main(string[] args)
- {
- string championship = Console.ReadLine();
- string ticketType = Console.ReadLine();
- int ticketCount = int.Parse(Console.ReadLine());
- string picture = Console.ReadLine();
- double price = 0;
- switch (championship)
- {
- case "Quarter final":
- if (ticketType == "Standard")
- {
- price = 55.50;
- price *= ticketCount;
- }
- if (ticketType == "Premium")
- {
- price = 105.20;
- price *= ticketCount;
- }
- if (ticketType == "VIP")
- {
- price = 118.90;
- price *= ticketCount;
- }
- break;
- case "Semi final":
- if (ticketType == "Standard")
- {
- price = 75.88;
- price *= ticketCount;
- }
- if (ticketType == "Premium")
- {
- price = 125.22;
- price *= ticketCount;
- }
- if (ticketType == "VIP")
- {
- price = 300.40;
- price *= ticketCount;
- }
- break;
- case "Final":
- if (ticketType == "Standard")
- {
- price = 110.10;
- price *= ticketCount;
- }
- if (ticketType == "Premium")
- {
- price = 160.66;
- price *= ticketCount;
- }
- if (ticketType == "VIP")
- {
- price = 400;
- price *= ticketCount;
- }
- break;
- }
- if (price >= 4000)
- {
- price = (price - price * 0.25);
- }
- else if (price >= 2500)
- {
- price = (price - price * 0.10);
- }
- if (picture == "Y" || ticketCount >= 25)
- {
- ticketCount *= 40;
- price += ticketCount;
- }
- else
- {
- }
- Console.WriteLine($"{price:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement