Advertisement
Guest User

Untitled

a guest
Sep 19th, 2016
912
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _13.Volleyball
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string yearType = Console.ReadLine();
  14. double p = int.Parse(Console.ReadLine()); // брой празници без събота и неделя
  15. double h = int.Parse(Console.ReadLine()); // уикенди за пътуване до родния град
  16. double uikendiVGodinata = 48;
  17. double uikendiVSofia = (uikendiVGodinata - h) * 3 / 4;
  18.  
  19. double igriVGrada = h;
  20. double igriVSofia = p * 2 / 3;
  21.  
  22. double all = uikendiVSofia + igriVGrada + igriVSofia;
  23. double ifYear = 0;
  24.  
  25. if (yearType == "leap")
  26. {
  27. ifYear = (15 * all) / 100;
  28. }
  29. double final = Math.Truncate(ifYear + all);
  30. Console.WriteLine(final);
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement