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 _2017_07_May_School_Camp
- {
- class Program
- {
- static void Main(string[] args)
- {
- string Season = Console.ReadLine();
- string Gender = Console.ReadLine();
- var numberStudents = int.Parse(Console.ReadLine());
- var numberNihts = int.Parse(Console.ReadLine());
- var nightPrice = 0.00;
- string sport = string.Empty;
- switch (Season)
- {
- case "Winter":
- {
- switch (Gender)
- {
- case "boys": nightPrice = 9.6; sport = "Judo";break;
- case "girls": nightPrice = 9.6; sport = "Gymnastics" ; break;
- case "mixed": nightPrice = 10; sport = "Ski"; break;
- }
- break;
- }
- case "Summer":
- {
- switch (Gender)
- {
- case "boys": nightPrice = 15; sport = "Football"; break;
- case "girls": nightPrice = 15; sport = "Volleyball"; break;
- case "mixed": nightPrice = 20; sport = "Swimming"; break;
- }
- break;
- }
- case "Spring":
- {
- switch (Gender)
- {
- case "boys": nightPrice = 7.2; sport = "Tennis"; break;
- case "girls": nightPrice = 7.2; sport = "Athletics"; break;
- case "mixed": nightPrice = 9.50; sport = "Cicling"; break;
- }
- break;
- }
- }
- var total = nightPrice*numberStudents* numberNihts ;
- if (numberStudents>=50)
- {
- total /=2 ; //50% отстъпка/
- }
- else if (numberStudents>=20)
- {
- total -= total * 0.15;
- }
- else if (numberStudents>=10)
- {
- total -= total * 0.05;
- }
- Console.WriteLine($"{sport} {total:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment