bacco

Кино : Switch-case

Jan 27th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using System;
  2.  
  3. namespace dwdwdwdwDD
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var typeProjection = Console.ReadLine().ToLower();
  10.  
  11.             var rools = int.Parse(Console.ReadLine());
  12.             var colons = int.Parse(Console.ReadLine());
  13.  
  14.             var allSeats = rools * colons;
  15.  
  16.             switch (typeProjection)
  17.             {
  18.                 case "premiere" : Console.WriteLine("{0:f2}",(allSeats * 12.00)); break;
  19.                 case "normal": Console.WriteLine("{0:f2}",(allSeats * 7.50)); break;
  20.                 case "discount": Console.WriteLine("{0:f2}",(allSeats * 5.00)); break;
  21.             }
  22.             Console.WriteLine("leva");
  23.         }
  24.  
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment