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;
- using System.Globalization;
- namespace Time_Plus_15_Minutes
- {
- class Program
- {
- static void Main(string[] args)
- {
- int hours = int.Parse(Console.ReadLine());
- int minutes = int.Parse(Console.ReadLine());
- minutes = minutes + 15;
- if(minutes>59)
- {
- if(minutes==60)
- {
- hours += 1;
- minutes = 0;
- }
- else
- {
- hours += 1;
- minutes = minutes - 60;
- }
- }
- if(hours>23)
- {
- hours = 0;
- }
- Console.WriteLine("{0}:{1:00}",hours,minutes);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment