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_plus_15_Minutes
- {
- class Program
- {
- static void Main(string[] args)
- {
- var hours = int.Parse(Console.ReadLine());
- var mins = int.Parse(Console.ReadLine());
- int new_Time = mins + 15;
- if (new_Time > 59)
- {
- hours += 1;
- new_Time -= 60;
- if (hours > 23 && new_Time > 9)
- {
- Console.WriteLine(0 + ":" + new_Time);
- }
- else if (hours > 23 && new_Time < 10)
- {
- Console.WriteLine(0 + ":" + 0 + new_Time);
- }
- }
- else
- {
- Console.WriteLine(hours + ":" + new_Time);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement