Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace School_Camp
- {
- class Program
- {
- static void Main(string[] args)
- {
- string season = Console.ReadLine();
- string group = Console.ReadLine();
- int countStudents = int.Parse(Console.ReadLine());
- int nights = int.Parse(Console.ReadLine());
- decimal price = 0;
- if (season == "Winter")
- {
- if (group == "boys")
- {
- decimal pricePerNights = countStudents * 9.60m * nights;
- price = pricePerNights;
- Console.WriteLine($"Judo {price:f2} lv.");
- }
- else if (group == "girls")
- {
- decimal pricePerNights = countStudents * 9.60m * nights;
- price = pricePerNights;
- Console.WriteLine($"Gymnastics {price:f2} lv.");
- }
- else if (group == "mixed")
- {
- decimal pricePerNights = countStudents * 10.00m * nights;
- price = pricePerNights;
- Console.WriteLine($"Ski {price:f2} lv.");
- }
- }
- else if (season == "Spring")
- {
- if (group == "boys" )
- {
- decimal pricePerNights = countStudents * 7.20m * nights;
- if (countStudents >= 20)
- {
- price = pricePerNights - (0.15m * pricePerNights);
- Console.WriteLine($"Tennis {price:f2} lv.");
- }
- else if (group == "girls")
- {
- if (countStudents >= 20)
- {
- price = pricePerNights - (0.15m * pricePerNights);
- Console.WriteLine($"Athletics {price:f2} lv.");
- }
- }
- }
- if (group == "mixed")
- {
- decimal pricePerNights = countStudents * 9.50m * nights;
- if (countStudents >= 10 && countStudents <= 20)
- {
- price = pricePerNights - (0.05m * pricePerNights);
- }
- else
- {
- pricePerNights = price;
- }
- Console.WriteLine($"Cycling {price:f2} lv.");
- }
- }
- if (season == "Summer")
- {
- if (group == "boys")
- {
- decimal pricePerNights = countStudents * 15m * nights;
- if (countStudents >= 50)
- {
- price = pricePerNights - (0.50m * pricePerNights);
- Console.WriteLine($"Football {price:f2} lv.");
- }
- }
- else if (group == "girls")
- {
- decimal pricePerNights = countStudents * 15m * nights;
- if (countStudents >= 20)
- {
- price = pricePerNights - (0.15m * pricePerNights);
- Console.WriteLine($"Volleyball {price:f2} lv.");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement