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