Advertisement
g-stoyanov

Task01Cinema

Apr 14th, 2014
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. namespace Task01Cinema
  2. {
  3.     using System;
  4.  
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             string projectionType = Console.ReadLine();
  10.             int rows = int.Parse(Console.ReadLine());
  11.             int columns = int.Parse(Console.ReadLine());
  12.             int allSeats = rows * columns;
  13.             decimal price = 0;
  14.             switch (projectionType)
  15.             {
  16.                 case "Premiere": price = 12;
  17.                     break;
  18.                 case "Normal": price = 7.5M;
  19.                     break;
  20.                 case "Discount": price = 5;
  21.                     break;
  22.             }
  23.  
  24.             Console.WriteLine("{0:F2} leva", price * allSeats);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement