Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _5._Време___15_минути
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double hours = double.Parse(Console.ReadLine());
  10. double minutes = double.Parse(Console.ReadLine());
  11.  
  12. minutes =minutes + 15;
  13.  
  14. if (minutes>= 60)
  15. {
  16. minutes = minutes -60;
  17. hours = hours + 1;
  18. }
  19. if (hours>=24)
  20. {
  21. hours = hours - 24;
  22. }
  23. Console.WriteLine($"{hours}:{minutes:D2}");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement