Advertisement
dimipan80

Exam 4. Cinema

Jun 13th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. namespace _1.Cinema
  2. {
  3.     using System;
  4.  
  5.     public class Cinema
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             checked
  10.             {
  11.                 string typeOfProjection = Console.ReadLine();
  12.                 int rows = int.Parse(Console.ReadLine());
  13.                 int columns = int.Parse(Console.ReadLine());
  14.  
  15.                 int countWatchingPeople = rows * columns;
  16.                 double priceOfTicket = 7.50;
  17.                 if (typeOfProjection == "Premiere")
  18.                 {
  19.                     priceOfTicket = 12.00;
  20.                 }
  21.                 else if (typeOfProjection == "Discount")
  22.                 {
  23.                     priceOfTicket = 5.00;
  24.                 }
  25.  
  26.                 double incomesProjection = countWatchingPeople * priceOfTicket;
  27.  
  28.                 Console.WriteLine("{0:f2} leva", incomesProjection);
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement