VelizarAvramov

11. Cinema

Mar 21st, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _09_Cinema
  8. {
  9.     class cinema
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string cinema = Console.ReadLine();
  14.             int rows = int.Parse(Console.ReadLine());
  15.             int colums = int.Parse(Console.ReadLine());
  16.  
  17.             double result = 0;
  18.  
  19.             if (cinema == "Premiere")
  20.             {
  21.                 result = rows * colums * 12;
  22.                 Console.WriteLine("{0:f2}" , result);
  23.             }
  24.             else if (cinema == "Normal")
  25.             {
  26.                 result = rows * colums * 7.50;
  27.                 Console.WriteLine("{0:f2}" , result);
  28.             }
  29.             else if (cinema == "Discount")
  30.             {
  31.                 result = rows * colums * 5.00;
  32.                 Console.WriteLine("{0:f2}" , result);
  33.             }
  34.  
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment