Advertisement
Guest User

Volley

a guest
May 16th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 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 ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string y = Console.ReadLine();
  14. double p = double.Parse(Console.ReadLine());
  15. double h = double.Parse(Console.ReadLine());
  16. double perc = 0;
  17. double weekends = (48 - h) * 3.0 / 4;
  18. double gamesWeek = p * 2.0 / 3;
  19. double total = h + gamesWeek + weekends;
  20.  
  21. if (y == "leap")
  22. {
  23. perc = total * 0.15;
  24. }
  25. Console.WriteLine(Math.Truncate(total + perc));
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement