Advertisement
YavorJS

Time plus 15 seconds

May 31st, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 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_15_Minutes
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var hours = int.Parse(Console.ReadLine());
  14. var mins = int.Parse(Console.ReadLine()) + 15;
  15.  
  16. if (mins > 59)
  17. {
  18. hours += 1;
  19. mins = mins - 60;
  20. }
  21. if (hours == 24)
  22. {
  23. hours = 0;
  24. }
  25. Console.WriteLine("{0}:{1:D2}", hours, mins);
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement