Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SchoolCamp
- {
- class Program
- {
- static void Main(string[] args)
- {
- string season = Console.ReadLine().ToLower();
- string typeGroup = Console.ReadLine().ToLower();
- int students = int.Parse(Console.ReadLine());
- int overnights = int.Parse(Console.ReadLine());
- double price = 0.0;
- string typeSport = "";
- //season if
- if (season == "winter")
- {
- if (typeGroup== "boys"|| typeGroup=="girls")
- {
- price = (students*9.60)*overnights;
- }
- else if (typeGroup == "mixed")
- {
- price = (students * 10)*overnights;
- }
- }
- else if (season == "spring")
- {
- if (typeGroup == "boys" || typeGroup == "girls")
- {
- price = (students * 7.20)*overnights;
- }
- else if (typeGroup == "mixed")
- {
- price = (students * 9.50)*overnights;
- }
- }
- else if (season == "summer")
- {
- if (typeGroup == "boys" || typeGroup == "girls")
- {
- price = (students * 15)*overnights;
- }
- else if (typeGroup == "mixed")
- {
- price = (students * 20)*overnights;
- }
- }
- //price if
- if (students >= 10 && students < 20)
- {
- price = price - price * 0.05;
- }
- else if (price >= 20 && price< 50)
- {
- price = price - price * 0.15;
- }
- else if (students > 50)
- {
- price = price / 2;
- }
- // sport if
- if (season == "winter")
- {
- if (typeGroup=="girls")
- {
- typeSport = "Gymnastic";
- }
- else if (typeGroup == "boys")
- {
- typeSport = "Judo";
- }
- else if (typeGroup=="mixed")
- {
- typeSport = "Ski";
- }
- }
- else if (season =="spring")
- {
- if (typeGroup == "girls")
- {
- typeSport = "Athletics";
- }
- else if (typeGroup == "boys")
- {
- typeSport = "Tennis";
- }
- else if (typeGroup == "mixed")
- {
- typeSport = "Cycling";
- }
- }
- else if (season == "summer")
- {
- if (typeGroup == "girls")
- {
- typeSport = "Volleyball";
- }
- else if (typeGroup == "boys")
- {
- typeSport = "Football";
- }
- else if (typeGroup == "mixed")
- {
- typeSport = "Swimming";
- }
- }
- Console.WriteLine($"{typeSport} {price:f2}lv");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement