Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TimePlus15Mins
- {
- class Program
- {
- static void Main(string[] args)
- {
- var H = int.Parse(Console.ReadLine());
- var M = int.Parse(Console.ReadLine());
- var min = M + 15;
- if (min > 59)
- {
- H = H + 1;
- min = min - 60;
- }
- if (H >= 24)
- {
- H = H - 24;
- }
- Console.WriteLine("{0}:{01:00}", H, min);
- }
- }
- }
- // var sec1 = int.Parse(Console.ReadLine());
- // var sec2 = int.Parse(Console.ReadLine());
- // var sec3 = int.Parse(Console.ReadLine());
- // var secs = sec1 + sec2 + sec3;
- // var mins = secs / 60;
- // secs = secs % 60;
- // Console.WriteLine("{0}:{1}", mins, secs.ToString().PadLeft(2, '0'));
Advertisement
Add Comment
Please, Sign In to add comment