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