anizko

02. Cinema

Apr 1st, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Cinema
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string KindProjection = Console.ReadLine().ToLower();
  10.             double r = double.Parse(Console.ReadLine());
  11.             double c = double.Parse(Console.ReadLine());
  12.             double Zala = c * r;
  13.             double Total = 0;
  14.  
  15.             if (KindProjection == "premiere")
  16.             {
  17.                 Total = Zala * 12;
  18.             }
  19.             else if (KindProjection == "normal")
  20.             {
  21.                 Total = Zala * 7.5;
  22.             }
  23.             else if (KindProjection == "discount")
  24.             {
  25.                 Total = Zala * 5;
  26.             }
  27.  
  28.             Console.WriteLine($"{Total:F2} leva");
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment