Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03._Basketball_Match
- {
- class Program
- {
- static void Main(string[] args)
- {
- string sector = Console.ReadLine(); //"Sector A", "Sector B", "Sector C", "Sector D"
- int rows = int.Parse(Console.ReadLine());
- int seats = int.Parse(Console.ReadLine());
- //1. цена на билета (зависи от сектора)
- //2. общ брой седалки = бр. редове * седалки
- //3. печалба = цена на билета * общ брой седалки
- double priceTicket = 0;
- //Sector A – цена на билета 11.60 лева
- //Sector B – цена на билета 14.50 лева
- //Sector C – цена на билета 16.10 лева
- //Sector D – цена на билета 8.40 лева
- if (sector == "Sector A")
- {
- priceTicket = 11.60;
- }
- else if (sector == "Sector B")
- {
- priceTicket = 14.50;
- }
- else if (sector == "Sector C")
- {
- priceTicket = 16.10;
- }
- else if (sector == "Sector D")
- {
- priceTicket = 8.40;
- }
- int totalSeats = rows * seats;
- double profit = totalSeats * priceTicket;
- Console.WriteLine($"{sector} profit is {profit:F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement