Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Volleyball
- {
- static void Main(string[] args)
- {
- var yearType = Console.ReadLine().ToLower();
- var p = double.Parse(Console.ReadLine());
- var h = double.Parse(Console.ReadLine());
- var volley = (h + ((48 - h) * (3.0 / 4)) + (p * (2.0 / 3)));
- if (yearType == "normal")
- {
- Console.WriteLine(Math.Truncate(volley));
- }
- if (yearType == "leap")
- {
- Console.WriteLine(Math.Truncate((volley * 0.15) + volley));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement