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