Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int hours = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine()) + 30;
- if (minutes > 59)
- {
- hours += 1;
- minutes -= 60;
- }
- if (hours > 23)
- {
- hours = 0;
- }
- Console.WriteLine("{0}:{1:D2}", hours, minutes);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement