Advertisement
YavorJS

Minutes + 15 sec

May 31st, 2016
250
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. 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. int hours = int.Parse(Console.ReadLine());
  14. int mins = int.Parse(Console.ReadLine());
  15.  
  16. mins = hours*60+mins+15;
  17. hours = mins / 60;
  18. mins = mins % 60;
  19.  
  20. if (hours == 24)
  21. {
  22. hours = 0;
  23. }
  24.  
  25. Console.WriteLine("{0}:{1:D2}", hours, mins);
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement