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