Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _01._Cinema
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string type = Console.ReadLine();
- int rows = int.Parse(Console.ReadLine());
- int cols = int.Parse(Console.ReadLine());
- //1. общ брой на местата в кинозалата = общ брой закупени билети
- int countTickets = rows * cols;
- //2. приход = бр. закупени билет * цена за билета
- //type -> серия от проверки за точни стойности
- //Premiere -> 12
- //Normal -> 7.5
- //Discount -> 5
- double priceTicket = 0;
- switch (type)
- {
- case "Premiere":
- priceTicket = 12;
- break;
- case "Normal":
- priceTicket = 7.50;
- break;
- case "Discount":
- priceTicket = 5;
- break;
- }
- double profit = countTickets * priceTicket;
- Console.WriteLine($"{profit:F2} leva");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement