Advertisement
Guest User

Untitled

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