Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         string type = Console.ReadLine().ToLower();
  7.         var rows = double.Parse(Console.ReadLine());
  8.         var cols = double.Parse(Console.ReadLine());
  9.  
  10.         double full = rows * cols;
  11.         double total = 0;
  12.  
  13.         switch (type)
  14.         {
  15.             case "premiere":
  16.                 total = full * 12.00;
  17.                 break;
  18.             case "normal":
  19.                 total = full * 7.50;
  20.                 break;
  21.             case "discount":
  22.                 total = full * 5.00;
  23.                 break;
  24.         }
  25.         Console.WriteLine("{0:F2} leva", total);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement