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 ConsoleApp9
- {
- class Program
- {
- static void Main(string[] args)
- {
- int groupSize = int.Parse(Console.ReadLine());
- string package = Console.ReadLine();
- string hall = null;
- int priceHall = 0;
- if (groupSize <= 50)
- {
- hall = "Small Hall";
- priceHall = 2500;
- } else if (groupSize > 50 && groupSize <= 100)
- {
- hall = "Terrace";
- priceHall = 5000;
- } else if (groupSize > 100 && groupSize <= 120)
- {
- hall = "Great Hall";
- priceHall = 7500;
- }
- double discount = 0;
- int packagePrice = 0;
- if (package.Equals("Normal"))
- {
- discount = 0.05;
- packagePrice = 500;
- } else if (package.Equals("Gold"))
- {
- discount = 0.10;
- packagePrice = 750;
- } else if (package.Equals("Platinum"))
- {
- discount = 0.15;
- packagePrice = 1000;
- }
- if (groupSize >= 0 && groupSize <= 120)
- {
- int totalPrice = 0;
- totalPrice = priceHall + packagePrice;
- double total = totalPrice - (totalPrice * discount);
- double pricePerPerson = total / groupSize;
- Console.WriteLine("We can offer you the " + hall);
- Console.WriteLine($"The price per person is {pricePerPerson:F2}$");
- } else
- {
- Console.WriteLine("We do not have an appropriate hall.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment