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