Advertisement
Guest User

Untitled

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