Advertisement
SamuilGetov

switchCaseCinema

Jan 26th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Lesson4Exsersise
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string type = Console.ReadLine();
  10.             int rows = int.Parse(Console.ReadLine());
  11.             int colums = int.Parse(Console.ReadLine());
  12.  
  13.             switch (type)
  14.             {
  15.                 case "Premiere": Console.WriteLine($"{(rows * colums * 12.00):f2} leva"); break;
  16.                 case "Normal": Console.WriteLine($"{(rows * colums * 7.50):f2} leva"); break;
  17.                 case "Discount": Console.WriteLine($"{(rows * colums * 5.00):f2} leva"); break;
  18.                                
  19.             }
  20.  
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement