Advertisement
plamen27

Fixed code +15 minutes

Jun 27th, 2016
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 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 _1_TEST
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. var hour = int.Parse(Console.ReadLine());
  15. var min = int.Parse(Console.ReadLine());
  16. min = min + 15;
  17.  
  18. if (min >= 60)
  19. {
  20. min = min - 60;
  21. hour = hour + 1;
  22.  
  23. }
  24.  
  25. if (hour > 23)
  26. { hour = hour - 24; }
  27. if (min < 10)
  28. {
  29. Console.WriteLine(hour + ":" + "0" + min);
  30. }
  31. if (min >= 10)
  32. {
  33. Console.WriteLine(hour + ":" + min);
  34. }
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement