Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. string year=Console.ReadLine();
  8. int p=int.Parse(Console.ReadLine());
  9. int h=int.Parse(Console.ReadLine());
  10. int weekendSofia=(48-h);
  11. double nonWorkWeekend=(weekendSofia*3.0/4);
  12. double publicPlay=(p*2.0/3);
  13.  
  14. if (year=="normal")
  15. {
  16. double final=nonWorkWeekend+h+publicPlay;
  17. Console.WriteLine(Math.Truncate(final));
  18. }
  19. else if (year=="leap")
  20. {
  21. double final=((nonWorkWeekend+h+publicPlay)+((nonWorkWeekend+h+publicPlay)/100)*15);
  22. Console.WriteLine(Math.Truncate(final));
  23. }
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement