Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Loops
- {
- class Program
- {
- static void Main(string[] args)
- {
- string final = Console.ReadLine();
- string ticket = Console.ReadLine();
- int ticketCount = int.Parse(Console.ReadLine());
- char trophey = char.Parse(Console.ReadLine());
- double ticketPrice = 0.0;
- if (final == "Quarter final")
- {
- if (ticket == "Standard")
- {
- ticketPrice = 55.50;
- }
- else if (ticket == "Premium")
- {
- ticketPrice = 105.20;
- }
- else
- {
- ticketPrice = 118.90;
- }
- }
- else if (final == "Semi final")
- {
- if (ticket == "Standard")
- {
- ticketPrice = 75.88;
- }
- else if (ticket == "Premium")
- {
- ticketPrice = 125.22;
- }
- else
- {
- ticketPrice = 300.40;
- }
- }
- else
- {
- if (ticket == "Standard")
- {
- ticketPrice = 110.10;
- }
- else if (ticket == "Premium")
- {
- ticketPrice = 160.66;
- }
- else
- {
- ticketPrice = 400.0;
- }
- }
- double tickets = ticketCount * ticketPrice;
- if (tickets > 4000)
- {
- tickets *= 0.75;
- }
- else if (tickets > 2500)
- {
- tickets *= 0.90;
- }
- double picturePrice = 0.0;
- if (trophey == 'Y' && tickets <= 4000)
- {
- picturePrice = ticketCount * 40;
- }
- double fullPrice = tickets + picturePrice;
- Console.WriteLine($"{fullPrice:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement