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 hours = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- int hoursInMinutes = hours*60;
- int minutesPlus15 = hoursInMinutes + minutes + 15;
- int hoursAfter15 = minutesPlus15 / 60;
- int minutesAfter15 = minutesPlus15 % 60;
- if (hoursAfter15 == 24)
- {
- hoursAfter15 = 0;
- }
- Console.WriteLine($"{hoursAfter15}:{minutesAfter15:D2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement