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