Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int hour = int.Parse(Console.ReadLine());
- int minute = int.Parse(Console.ReadLine());
- DateTime exactTime = DateTime.ParseExact($"{hour}:{minute}", "H:m", null);
- DateTime after30min = exactTime.AddMinutes(30);
- Console.WriteLine(after30min.ToString("H:mm"));
Advertisement
Add Comment
Please, Sign In to add comment