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 hours = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- int allMinutes = minutes + 15 + hours * 60;
- int totalHours = allMinutes / 60;
- minutes = allMinutes - totalHours * 60;
- if (totalHours == 24)
- {
- totalHours = 0;
- }
- Console.WriteLine($"{totalHours}:{minutes:D2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement