Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Cinema
- {
- class Program
- {
- static void Main(string[] args)
- {
- double pricePremiere = 12.0d;
- double priceNormal = 7.5d;
- double priceDiscount = 5.0d;
- string type = Console.ReadLine();
- double rows = double.Parse(Console.ReadLine());
- double cols = double.Parse(Console.ReadLine());
- double watchers = rows * cols;
- double price = 0.0d;
- switch (type)
- {
- case "Premiere":
- price = watchers * pricePremiere;
- Console.WriteLine("{0:f2}",price);break;
- case "Normal":
- price = watchers * priceNormal;
- Console.WriteLine("{0:f2}", price); break;
- case "Discount":
- price = watchers * priceDiscount;
- Console.WriteLine("{0:f2}", price); break;
- default:break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment