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