Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TimePlusFiftheenMin
- {
- class Program
- {
- static void Main(string[] args)
- {
- int hour = int.Parse(Console.ReadLine())*60;
- int min = int.Parse(Console.ReadLine())+15;
- var all = hour + min;
- var inHours = all / 60;
- var inMin = all % 60;
- if (inHours>23)
- {
- inHours = 0;
- }
- if (inMin<10)
- {
- Console.WriteLine(inHours + ":0" + inMin);
- }
- else
- {
- Console.WriteLine(inHours + ":" + inMin);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement