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 personsCount = int.Parse(Console.ReadLine());
- string groupType = Console.ReadLine();
- string day = Console.ReadLine();
- double pricePerPerson = 0;
- if (groupType == "Students")
- {
- if (day == "Friday")
- {
- pricePerPerson = 8.45;
- }
- else if (day == "Saturday")
- {
- pricePerPerson = 9.80;
- }
- else if (day == "Sunday")
- {
- pricePerPerson = 10.46;
- }
- }
- if (groupType == "Business")
- {
- if (day == "Friday")
- {
- pricePerPerson = 10.90;
- }
- else if (day == "Saturday")
- {
- pricePerPerson = 15.60;
- }
- else if (day == "Sunday")
- {
- pricePerPerson = 16;
- }
- }
- if (groupType == "Regular")
- {
- if (day == "Friday")
- {
- pricePerPerson = 15;
- }
- else if (day == "Saturday")
- {
- pricePerPerson = 20;
- }
- else if (day == "Sunday")
- {
- pricePerPerson = 22.50;
- }
- }
- double totalPrice = pricePerPerson * personsCount;
- if (groupType == "Students" && personsCount >= 30)
- {
- totalPrice = totalPrice * 0.85;
- Console.WriteLine($"Total price: {totalPrice:F2}");
- }
- if (groupType == "Business" && personsCount >= 100)
- {
- totalPrice = (totalPrice - (pricePerPerson * 10));
- Console.WriteLine($"Total price: {totalPrice:F2}");
- }
- if (groupType == "Regular" && personsCount >= 10 && personsCount <= 20)
- {
- totalPrice = totalPrice * 0.95;
- Console.WriteLine($"Total price: {totalPrice:F2}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement