Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Вело_състезание
- {
- class Program
- {
- static void Main(string[] args)
- {
- int countJ = int.Parse(Console.ReadLine());
- int countS = int.Parse(Console.ReadLine());
- string trase = Console.ReadLine();
- double money1 = 0;//juniors
- double money2 = 0;//senors
- if (trase == "trail")
- {
- money1 = 5.50;
- money2 = 7;
- }
- else if (trase == "cross-country")
- {
- money1 = 8;
- money2 = 9.50;
- }
- else if (trase == "downhill")
- {
- money1 = 12.25;
- money2 = 13.75;
- }
- else if (trase == "road")
- {
- money1 = 20;
- money2 = 21.50;
- }
- double finalSum =( money1 * countJ)
- + (money2 * countS);
- if (countJ+countS>=50)
- {
- finalSum = finalSum * 0.75;
- }
- Console.WriteLine($"{finalSum*0.95:f2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment