Advertisement
VickSuna

Untitled

Feb 19th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _325_Time___15_Minutes
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int hour = int.Parse(Console.ReadLine());
  10. int minute = int.Parse(Console.ReadLine());
  11. int allMinutes = (hour * 60) + minute + 15;
  12. int newHours = allMinutes / 60;
  13. int newMinutes = allMinutes % 60;
  14. if (newHours == 24)
  15. {
  16. newHours = 0;
  17. }
  18.  
  19. Console.WriteLine($"{newHours}:{newMinutes:D2}");
  20.  
  21.  
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement