Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Time_15Min
- {
- class Program
- {
- static void Main(string[] args)
- {
- int hour = int.Parse(Console.ReadLine());
- int min = int.Parse(Console.ReadLine());
- int sum = ((hour * 60) + min + 15);
- int resultHour = sum / 60;
- if (resultHour >= 24)
- {
- resultHour -= 24;
- }
- int resultMin = sum % 60;
- Console.WriteLine($"{resultHour}:{resultMin:D2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement