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