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 RestaurantDiscount
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool suitable = true;
- double hallPrice = 2500d;
- string hall = "";
- int number = int.Parse(Console.ReadLine());
- string package = Console.ReadLine().ToLower();
- if (number<50)
- {
- hallPrice = 2500;
- hall = "Small Hall";
- }
- if (number > 50 && number < 100)
- {
- hallPrice = 5000;
- hall = "Terrace";
- }
- if (number > 100 && number < 120)
- {
- hallPrice = 7500;
- hall = "Great Hall";
- }
- if(number>120)
- {
- Console.WriteLine("We do not have an appropriate hall.");
- suitable = false;
- }
- if (suitable)
- {
- switch (package)
- {
- case "normal":
- hallPrice = (hallPrice + 500) * 0.95;
- break;
- case "gold":
- hallPrice = (hallPrice + 750) * 0.90;
- break;
- case "platinum":
- hallPrice = (hallPrice + 1000) * 0.85;
- break;
- }
- Console.WriteLine($"We can offer you the {hall}");
- Console.WriteLine("The price per person is {0:0.00}$", hallPrice / number);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement