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