Advertisement
Aleksiev

Cinema

Apr 15th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. class Cinema
  4. {
  5.     static void Main()
  6.     {
  7.         string projection = Console.ReadLine();
  8.         int rows = int.Parse(Console.ReadLine());
  9.         int cols = int.Parse(Console.ReadLine());
  10.  
  11.         double premierePrice = 12.00d;
  12.         double normalPrice = 7.50d;
  13.         double discountPrice = 5.00d;
  14.  
  15.         int people = rows * cols;
  16.  
  17.         double totalPrice = 0;
  18.  
  19.         if(projection == "Premiere")
  20.         {
  21.             totalPrice = people * premierePrice;
  22.         }
  23.         else if(projection == "Normal")
  24.         {
  25.             totalPrice = people * normalPrice;
  26.         }
  27.         else if(projection == "Discount")
  28.         {
  29.             totalPrice = people * discountPrice;
  30.         }
  31.  
  32.         Console.WriteLine("{0:F2} leva", totalPrice);
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement