Advertisement
Valantina

WorldSnookerChampionship/EX

Jun 13th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. using System;
  2.  
  3. namespace WorldSnookerChampionship
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string championshipEtap = Console.ReadLine();
  10.             string ticketType = Console.ReadLine();
  11.             int ticketsCount = int.Parse(Console.ReadLine());
  12.             char photoWithTheTrophy = char.Parse(Console.ReadLine());
  13.  
  14.             double ticketPrice = 0;
  15.            if (totalTicketPrice > 4000)
  16.             {
  17.                 totalTicketPrice *= 0.75;
  18.             }
  19.             else if (totalTicketPrice > 2500)
  20.             {
  21.                 totalTicketPrice *= 0.90;
  22.                 if (photoWithTheTrophy == 'Y')
  23.                 {
  24.                     totalTicketPrice += ticketsCount * 40;
  25.                 }
  26.             }
  27.             else if (photoWithTheTrophy == 'Y')
  28.                 {
  29.                     totalTicketPrice += ticketsCount * 40;
  30.                 }
  31.            
  32.             Console.WriteLine($"{totalTicketPrice:F2}");
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement