IvetValcheva

01. Cinema

Jan 20th, 2022
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp19
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string type = Console.ReadLine();
  10.             int row = int.Parse(Console.ReadLine());
  11.             int col = int.Parse(Console.ReadLine());
  12.  
  13.             double income = 0.0;
  14.  
  15.             if (type == "Premiere")
  16.             {
  17.                 income = row * col * 12;
  18.             }
  19.             else if (type == "Normal")
  20.             {
  21.                 income = row * col * 7.5;
  22.  
  23.             }
  24.             else
  25.             {
  26.                 income = row * col * 5;
  27.  
  28.             }
  29.  
  30.             Console.WriteLine($"{income:F2} leva");
  31.         }
  32.     }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment