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;
- using System.Threading.Tasks;
- namespace Time_15Minutes
- {
- class Program
- {
- static void Main(string[] args)
- {
- int hour = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- int hourInMInutes = hour * 60;
- int totalMinutes = hourInMInutes + minutes;
- int minutesPlus15 = totalMinutes + 15;
- int newHour = minutesPlus15 / 60;
- int newMinutes = minutesPlus15 % 60;
- if(newHour == 24)
- {
- newHour = 0;
- }
- Console.WriteLine("{0}:{1:00}",newHour,newMinutes);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement