Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RestaurantDiscount
- {
- class RestaurantDiscount
- {
- static void Main()
- {
- decimal groupSize = decimal.Parse(Console.ReadLine());
- string package = Console.ReadLine().ToLower();
- string hall = "";
- decimal price = 0.0m;
- if (groupSize <= 50)
- {
- hall = "Small Hall";
- price = 2500.0m;
- }
- else if (groupSize <= 100 && groupSize > 50)
- {
- hall = "Terrace";
- price = 5000.0m;
- }
- else if (groupSize <= 120 && groupSize > 100)
- {
- hall = "Great Hall";
- price = 7500.0m;
- }
- else
- {
- Console.WriteLine("We do not have an appropriate hall.");
- return;
- }
- decimal discount = 0.0m;
- switch (package)
- {
- case "normal":
- price += 500.0m;
- discount = price * 0.5m;
- break;
- case "gold":
- price += 750.0m;
- discount = price * 0.10m;
- break;
- case "platinum":
- price += 1000.0m;
- discount = price * 0.15m;
- break;
- }
- decimal totalPrice = (price - discount) / groupSize;
- Console.WriteLine($"We can offer you the {hall}");
- Console.WriteLine($"The price per person is {totalPrice:F2}$");
- }
- }
- }
Add Comment
Please, Sign In to add comment