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