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