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 silvanadoc
- {
- class silvanadoc
- {
- static void Main(string[] args)
- {
- int junior = int.Parse(Console.ReadLine());
- int senior = int.Parse(Console.ReadLine());
- string trace = Console.ReadLine();
- int people = junior + senior;
- if (trace == "trail")
- {
- var money = ((junior * 5.5) + (senior * 7)) * 0.95;
- Console.WriteLine($"{money:f2}");
- }
- else if (trace == "cross-country")
- {
- if (people >= 50)
- {
- var money = (((junior * 8) + (senior * 9.5)) * 0.75) * 0.95;
- Console.WriteLine($"{money:f2}");
- }
- else
- {
- var money = ((junior * 8) + (senior * 9.50)) * 0.95;
- Console.WriteLine($"{money:f2}");
- }
- }
- else if (trace == "downhill")
- {
- var money = ((junior * 12.25) + (senior * 13.75)) * 0.95;
- Console.WriteLine($"{money:f2}");
- }
- else if (trace == "road")
- {
- var money = ((junior * 20) + (senior * 21.5)) * 0.95;
- Console.WriteLine($"{money:f2}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement