knikolov98

Untitled

Sep 17th, 2019
59
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 movietheather
  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 columns = int.Parse(Console.ReadLine());
  12.  
  13.             double sum = 0.0;
  14.  
  15.             if (type == "Premiere")
  16.  
  17.             {
  18.                 sum = rows * columns * 12;
  19.             }
  20.  
  21.             else if (type == "Normal")
  22.  
  23.             {
  24.                 sum = rows * columns * 7.5;
  25.  
  26.             }
  27.  
  28.             else if (type == "Discount")
  29.  
  30.             {
  31.                 sum = rows * columns * 5;
  32.  
  33.             }
  34.  
  35.             Console.WriteLine($"{sum:f2} leva");
  36.         }
  37.     }
  38. }
Add Comment
Please, Sign In to add comment