Advertisement
IvetValcheva

01. Cinema

Nov 15th, 2021
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string ticket = Console.ReadLine();
  10.             int row = int.Parse(Console.ReadLine());
  11.             int col = int.Parse(Console.ReadLine());
  12.  
  13.             double income = row * col;
  14.  
  15.             //Premiere-12.0,Normal-7.5,Discount-5.0
  16.  
  17.             switch (ticket)
  18.             {
  19.                 case "Premiere":
  20.                     income = income*12.00;
  21.                     break;
  22.                 case "Normal":
  23.                     income *= 7.50;
  24.                     break;
  25.                 case "Discount":
  26.                     income *= 5.00;
  27.                     break;
  28.                 default:
  29.                     break;
  30.             }
  31.  
  32.             //Console.WriteLine("{0:F2} leva", income);
  33.             Console.WriteLine($"{income:F2} leva");
  34.  
  35.  
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement