Advertisement
plamena_banova

PB-Cinema

Feb 19th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.17 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 _11_Cinema
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var projection = Console.ReadLine();
  14.             var r = int.Parse(Console.ReadLine());
  15.             var c = int.Parse(Console.ReadLine());
  16.             var places = r * c;
  17.             var price = double.Parse(Console.ReadLine());
  18.             var total = places * price;
  19.  
  20.             if (projection == "Premiere")
  21.             {
  22.                 price = 12.00;
  23.  
  24.                  Console.WriteLine("{0:F2}", total);
  25.             }
  26.             else
  27.             {
  28.                 if(projection=="Normal")
  29.                 {
  30.                     price = 7.50;
  31.                      Console.WriteLine("{0}:F2", total);
  32.                 }
  33.                 else
  34.                 {
  35.                     if(projection=="Discount")
  36.                     {
  37.                         price = 5.00;
  38.                          Console.WriteLine("{0}:F2", total);
  39.                     }
  40.                  
  41.                 }
  42.             }
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement