Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RestaurantDiscount
- {
- class Program
- {
- static void Main(string[] args)
- {
- int groupsize = int.Parse(Console.ReadLine());
- string package = Console.ReadLine();
- double price = 0;
- string typehall = "";
- double discount = 0;
- double pricePerson = 0;
- if (groupsize <= 50)
- {
- switch (package) {
- case "Gold":
- typehall = "Small Hall";
- price = 2500 + 750;
- discount = (price - (price * 10) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- case "Normal":
- typehall = "Small Hall";
- price = 2500 + 500;
- discount = (price - (price * 5) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- case "Platinum":
- typehall = "Small Hall";
- price = 2500 + 1000;
- discount = (price - (price * 15) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- }
- }
- else if (groupsize <= 100)
- {
- switch (package)
- {
- case "Gold":
- typehall = "Terrace";
- price = 5000 + 750;
- discount = (price - (price * 10) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- case "Normal":
- typehall = "Terrace";
- price = 5000 + 500;
- discount = (price - (price * 5) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- case "Platinum":
- typehall = "Terrace";
- price = 5000 + 1000;
- discount = (price - (price * 15) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- }
- } else if (groupsize<= 120)
- {
- switch (package)
- {
- case "Gold":
- typehall = "Great Hall";
- price = 7000 + 750;
- discount = (price - (price * 10) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- case "Normal":
- typehall = "Great Hall";
- price = 7000 + 500;
- discount = (price - (price * 5) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- case "Platinum":
- typehall = "Great Hall";
- price = 7000 + 1000;
- discount = (price - (price * 15) / 100);
- pricePerson = discount / groupsize;
- Console.WriteLine($"We can offer you the {typehall}");
- Console.WriteLine($"The price per person is {pricePerson:f2}$");
- break;
- }
- }
- else
- {
- Console.WriteLine("We do not have an appropriate hall.");
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement