tedo1111

Untitled

Jun 5th, 2019
134
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. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace cinema
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var type = Console.ReadLine().ToLower();
  14.             var r = int.Parse(Console.ReadLine());
  15.             var c = int.Parse(Console.ReadLine());
  16.             var price = 0.0;
  17.  
  18.             if (type == "premiere")
  19.             {
  20.                 price = 12.00;
  21.             }
  22.  
  23.             else if (type == "normal")
  24.             {
  25.                 price = 7.50;
  26.             }
  27.  
  28.             else if (type == "discount")
  29.             {
  30.                 price = 5.00;
  31.             }
  32.  
  33.             Console.WriteLine("{0:f2} leva", price * r * c);
  34.  
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment