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;
- decimal pricePerNights = 0;
- string sport = "";
- if (season == "Winter")
- {
- if (group == "boys")
- {
- pricePerNights = countStudents * 9.60m * nights;
- price = pricePerNights;
- sport = "Judo";
- }
- else if (group == "girls")
- {
- pricePerNights = countStudents * 9.60m * nights;
- price = pricePerNights;
- sport = "Gymnastics";
- }
- else if (group == "mixed")
- {
- pricePerNights = countStudents * 10.00m * nights;
- price = pricePerNights;
- sport = "Ski";
- }
- }
- else if (season == "Spring")
- {
- if (group == "boys")
- {
- // if (countStudents >= 20)
- // {
- pricePerNights = countStudents * 7.20m * nights;
- price = pricePerNights;
- sport = "Tennis";
- // }
- }
- else if (group == "girls")
- {
- pricePerNights = countStudents * 7.20m * nights;
- price = pricePerNights;
- sport = "Athletics";
- }
- if (group == "mixed")
- {
- pricePerNights = countStudents * 9.50m * nights;
- price = pricePerNights;
- sport = "Cycling";
- }
- }
- if (season == "Summer")
- {
- if (group == "boys")
- {
- // if (countStudents >= 50)
- // {
- pricePerNights = countStudents * 15m * nights;
- price = pricePerNights;
- sport = "Football";
- // }
- }
- else if (group == "girls")
- {
- pricePerNights = countStudents * 15m * nights;
- price = pricePerNights;
- sport = "Volleyball";
- }
- else if ( group == "mixed")
- {
- pricePerNights = countStudents * 20m * nights;
- price = pricePerNights;
- sport = "Swimming";
- }
- }
- int priceAfterDisc = 100;
- if (countStudents >= 50)
- {
- priceAfterDisc = 50;
- }
- else if (countStudents >= 20)
- {
- priceAfterDisc = 85;
- }
- else if (countStudents >= 10)
- {
- priceAfterDisc = 95;
- }
- decimal finalPrice = price * priceAfterDisc / 100;
- Console.WriteLine($"{sport} {finalPrice:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement