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