Advertisement
desislava_topuzakova

Untitled

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