Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- string year=Console.ReadLine();
- int p=int.Parse(Console.ReadLine());
- int h=int.Parse(Console.ReadLine());
- int weekendSofia=(48-h);
- double nonWorkWeekend=(weekendSofia*3.0/4);
- double publicPlay=(p*2.0/3);
- if (year=="normal")
- {
- double final=nonWorkWeekend+h+publicPlay;
- Console.WriteLine(Math.Truncate(final));
- }
- else if (year=="leap")
- {
- double final=((nonWorkWeekend+h+publicPlay)+((nonWorkWeekend+h+publicPlay)/100)*15);
- Console.WriteLine(Math.Truncate(final));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement