Advertisement
simeon3000

Time + 15 min

May 27th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1.         int h = int.Parse(Console.ReadLine());
  2.         int m = int.Parse(Console.ReadLine());
  3.            
  4.         DateTime hm = DateTime.ParseExact($"{h}:{m}", "H:m", null);
  5.            
  6.         hm = hm.AddMinutes(15);
  7.          
  8.         Console.WriteLine(hm.ToString("H:mm"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement