Advertisement
bacco

Кино

Jan 23rd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  1. using System;
  2.  
  3. namespace tESt
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             var type = Console.ReadLine().ToLower();
  11.             var row = int.Parse(Console.ReadLine());
  12.             var columns = int.Parse(Console.ReadLine());
  13.  
  14.             var peopleAtTime = row * columns;
  15.  
  16.             if (type == "premiere")
  17.             {
  18.                 var profit = peopleAtTime * 12.00;
  19.                 Console.WriteLine("{0:f2}",profit);
  20.                 Console.WriteLine("leva");
  21.             }
  22.             else if (type == "normal")
  23.             {
  24.                 var profit = peopleAtTime * 7.50;
  25.                 Console.WriteLine("{0:f2}", profit);
  26.                 Console.WriteLine("leva");
  27.             }
  28.             else if (type == "discount")
  29.             {
  30.                 var profit = peopleAtTime * 5.00;
  31.                 Console.WriteLine("{0:f2}", profit);
  32.                 Console.WriteLine("leva");
  33.             }
  34.             else
  35.             {
  36.                 Console.WriteLine("Error");
  37.             }
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement