Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Vacation
- {
- class Program
- {
- static void Main(string[] args)
- {
- int peopleCount = int.Parse(Console.ReadLine());
- string typeOfGropu = Console.ReadLine();
- string day = Console.ReadLine();
- decimal pricePerPerson = 0.0M;
- if (typeOfGropu == "Students")
- {
- if (day == "Friday")
- {
- pricePerPerson = 8.45M;
- }
- else if (day == "Saturday")
- {
- pricePerPerson = 9.80M;
- }
- else if (day == "Sunday")
- {
- pricePerPerson = 10.46M;
- }
- }
- else if (typeOfGropu == "Business")
- {
- if (day == "Fryday")
- {
- pricePerPerson = 10.90M;
- }
- else if (day == "Saturday")
- {
- pricePerPerson = 15.60M;
- }
- else if (day == "Sunday")
- {
- pricePerPerson = 16.00M;
- }
- }
- else if (typeOfGropu == "Regular")
- {
- if (day == "Fryday")
- {
- pricePerPerson = 15.00M;
- }
- else if (day == "Saturday")
- {
- pricePerPerson = 20.00M;
- }
- else if (day == "Sunday")
- {
- pricePerPerson = 22.50M;
- }
- }
- decimal totalPrice = pricePerPerson * peopleCount;
- if (typeOfGropu == "Students" && peopleCount >= 30)
- {
- totalPrice *= 0.85M;
- }
- else if (typeOfGropu == "Business" && peopleCount >= 100)
- {
- totalPrice -= pricePerPerson * 10;
- }
- else if (typeOfGropu == "Regular" && peopleCount >= 10 && peopleCount <= 20)
- {
- totalPrice *= 0.95M;
- }
- Console.WriteLine($"Total price: {totalPrice:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement