Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace time
- {
- class Program
- {
- static void Main(string[] args)
- {
- int startHour = int.Parse(Console.ReadLine());
- int startMinute = int.Parse(Console.ReadLine());
- int timeInMinutes = (startHour * 60) + startMinute;
- int timePlus15 = timeInMinutes + 15;
- int finalHour = timePlus15 / 60;
- int finalMinutes = finalHour / 60;
- if (finalHour >= 24)
- {
- finalHour -= 24;
- }
- if (finalMinutes < 10)
- {
- Console.WriteLine("{0}:0{1}", finalHour, finalMinutes);
- }
- else
- {
- Console.WriteLine("{0}:{1}", finalHour, finalMinutes);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement