Advertisement
ad2bg

Cinema

Oct 28th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. namespace Cinema
  2. {
  3.     using System;
  4.  
  5.     class Cinema
  6.     {
  7.         static void Main()
  8.         {
  9.             var movie = Console.ReadLine().ToLower();
  10.             var rows = int.Parse(Console.ReadLine());
  11.             var columns = int.Parse(Console.ReadLine());
  12.  
  13.             double price = 0.0;
  14.  
  15.             switch (movie)
  16.             {
  17.                 case "premiere": price = 12.0; break;
  18.                 case "normal": price = 7.5; break;
  19.                 case "discount": price = 5.0; break;
  20.                 default:
  21.                     break;
  22.             }
  23.  
  24.             Console.WriteLine("{0:f2}", rows * columns * price);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement