Advertisement
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;
- namespace TimePlus15
- {
- class Program
- {
- static void Main(string[] args)
- {
- int startHour = int.Parse(Console.ReadLine());
- int startMinutes = int.Parse(Console.ReadLine());
- int allInMinutes = startHour * 60 + startMinutes;
- int timePlus = allInMinutes + 15;
- int finalHour = timePlus / 60;
- int finalMintes = timePlus%60;
- if (finalHour==24)
- {
- finalHour = 0;
- }
- if (finalMintes<10)
- {
- Console.WriteLine(finalHour+":"+"0"+finalMintes);
- }
- else
- {
- Console.WriteLine(finalHour+":"+finalMintes);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement