Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Time15sec
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double h = double.Parse(Console.ReadLine());
  10. double m = double.Parse(Console.ReadLine());
  11.  
  12. m += 15;
  13.  
  14. if (m >= 60)
  15. {
  16. m = m - 60;
  17. h += 1;
  18. }
  19.  
  20. if (h >= 24)
  21. {
  22. h = 0;
  23. }
  24.  
  25. Console.WriteLine($"{h}:{m:d2}");
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement