SHARE
TWEET

Untitled

a guest Jun 24th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _03_Reastaurant_Dicount_May_30
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var groupeSize = double.Parse(Console.ReadLine());
  14.             string packageType = Console.ReadLine().ToLower().Trim();
  15.  
  16.             var price = 0.0;
  17.  
  18.             var hall = String.Empty;
  19.             var discountpercent = 1.0;
  20.  
  21.  
  22.             if (groupeSize <= 50)
  23.             {
  24.                 hall = "Small Hall";
  25.                 price += 2500;
  26.             }
  27.             else if (groupeSize <= 100)
  28.             {
  29.                 hall = "Terrace";
  30.                 price += 5000;
  31.             }
  32.             else if (groupeSize <= 120)
  33.             {
  34.                 hall = "Great Hall";
  35.                 price += 7500;
  36.             }
  37.             if (packageType == "normal")
  38.             {
  39.                 discountpercent = 0.95;
  40.                 price += 500;
  41.             }
  42.             else if (packageType == "gold")
  43.             {
  44.                 discountpercent = 0.90;
  45.                 price += 750;
  46.             }
  47.             else if (packageType == "platinum")
  48.             {
  49.                 discountpercent = 0.85;
  50.                 price += 1000;
  51.             }
  52.  
  53.  
  54.             if (groupeSize > 120)
  55.             {
  56.                 Console.WriteLine("We do not have an appropriate hall.");
  57.             }
  58.             else
  59.             {
  60.                 Console.WriteLine("We can offer you the {0}", hall);
  61.  
  62.                
  63.                 Console.WriteLine("The price per person is {0:F2}$", price * discountpercent / groupeSize);
  64.             }
  65.  
  66.  
  67.         }
  68.     }
  69. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top