Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _12.Time_15Minutes
- {
- class Program
- {
- static void Main()
- {
- int hours = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- minutes = minutes + 15;
- if (minutes > 59)
- {
- minutes = minutes - 60;
- hours = hours + 1;
- }
- if (hours == 24)
- {
- hours = 0;
- }
- Console.WriteLine($"{hours}:{minutes:0#}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement