desislava777

problem12

Oct 30th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 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 ConsoleApplication2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var godina = Console.ReadLine();
  14. int praznici = int.Parse(Console.ReadLine());
  15. int weekendrodengrad = int.Parse(Console.ReadLine());
  16. int weekendsofia = 48 - weekendrodengrad;
  17. double igrisofia = weekendsofia * 3.0 / 4;
  18. int igrirodengrad = weekendrodengrad;
  19. double igripraznik = praznici * 2.0 / 3;
  20. double igri = igrisofia + igrirodengrad + igripraznik;
  21. if (godina=="normal")
  22. Console.WriteLine(Math.Truncate(igri));
  23. else if (godina=="leap")
  24. {
  25. igri=igri+igri*0.15;
  26. Console.WriteLine(Math.Truncate(igri));
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment