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