Yachkov

Cinema

Jan 25th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.Design;
  4. using System.Globalization;
  5. using System.Reflection;
  6. using System.Runtime.ConstrainedExecution;
  7. using System.Security.Cryptography;
  8.  
  9. namespace SomeExcercises
  10. {
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             const double premiere = 12.00;
  16.             const double normal = 7.50;
  17.             const double discount = 5.00;
  18.             string typeOfProjection = Console.ReadLine();
  19.             int rows = int.Parse(Console.ReadLine());
  20.             int columns = int.Parse(Console.ReadLine());
  21.             double income = 0;
  22.  
  23.             if (typeOfProjection == "Premiere")
  24.             {
  25.                 income = (rows * columns) * premiere;
  26.             }
  27.             else if (typeOfProjection == "Normal")
  28.             {
  29.                 income = (rows * columns) * normal;
  30.             }
  31.             else if (typeOfProjection == "Discount")
  32.             {
  33.                 income = (rows * columns) * discount;
  34.             }
  35.  
  36.             Console.WriteLine($"{income:f2}");
  37.  
  38.  
  39.  
  40.         }
  41.  
  42.     }
  43. }
  44.  
  45.  
  46.  
  47.  
Advertisement
Add Comment
Please, Sign In to add comment