M0Hk

Cinema

Feb 26th, 2020
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _02.Cinema
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string projection = Console.ReadLine();
  10.             int numbOfRows = int.Parse(Console.ReadLine());
  11.             int numbOfColumns = int.Parse(Console.ReadLine());
  12.             double income = 0;
  13.             if (projection == "Premiere")
  14.             {
  15.                 income = numbOfColumns * numbOfRows * 12;
  16.             }
  17.             else if (projection == "Normal")
  18.             {
  19.                 income = numbOfColumns * numbOfRows * 7.50;
  20.             }
  21.             else if (projection == "Discount")
  22.             {
  23.                 income = numbOfColumns * numbOfRows * 5;
  24.             }
  25.             Console.WriteLine($"{income:F2} leva");
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment