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 totalPrice = 0;
- double packagePrice = 0;
- string hallName = null;
- double discount = 0;
- if (people <= 50)
- {
- hallName = "Small Hall";
- Console.WriteLine($"We can offer you the {hallName}");
- totalPrice = 2500;
- }
- else if (people <= 100)
- {
- hallName = "Terrace";
- Console.WriteLine($"We can offer you the {hallName}");
- totalPrice = 5000;
- }
- else if (people <= 120)
- {
- hallName = "Great Hall";
- Console.WriteLine($"We can offer you the {hallName}");
- totalPrice = 7500;
- }
- else
- {
- Console.WriteLine("We do not have an appropriate hall.");
- Environment.Exit(0);
- }
- switch (package)
- {
- case "Normal":
- packagePrice = 500;
- discount = Math.Abs((totalPrice + packagePrice) * 0.05);
- break;
- case "Gold":
- packagePrice = 750;
- discount = Math.Abs((totalPrice + packagePrice) * 0.10);
- break;
- case "Platinium":
- packagePrice = 1000;
- discount = Math.Abs((totalPrice + packagePrice) * 0.15);
- break;
- }
- totalPrice = Math.Abs((totalPrice - discount) / people);
- Console.WriteLine($"The price per person is {totalPrice:f2}$");
- }
- }
- }
Add Comment
Please, Sign In to add comment