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