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