Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Time___15_Minutes
- {
- class Program
- {
- static void Main(string[] args)
- {
- int hour = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- int timeMinutes = (hour * 60) + minutes;
- int minuts15 = timeMinutes + 15;
- int totalHours = minuts15 / 60;
- int totalMinutes = minuts15 % 60;
- if (totalHours >= 24)
- {
- totalHours -= 24;
- }
- if (totalMinutes < 10)
- {
- Console.WriteLine($"{totalHours}:0{totalMinutes}");
- }
- else
- {
- Console.WriteLine($"{totalHours}:{totalMinutes}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement