countDecko

Untitled

Sep 20th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 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 _15_minutes
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int hour = int.Parse(Console.ReadLine());
  14. int minutes = int.Parse(Console.ReadLine());
  15. minutes += 15;
  16. if (minutes > 59)
  17. {
  18. hour++;
  19. if (hour == 24) hour = 0;
  20. minutes -= 60;
  21. }
  22. if (minutes < 10) Console.WriteLine($"{hour}:0{minutes}");
  23. else Console.WriteLine($"{hour}:{minutes}");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment