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