Advertisement
Guest User

Untitled

a guest
Jul 20th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main (string [] args)
  6.     {
  7.         int hours = int.Parse (Console.ReadLine ());
  8.         int mins = int.Parse (Console.ReadLine ());
  9.  
  10.         mins += 15;
  11.  
  12.         if (mins >= 60)
  13.         {
  14.             hours += 1;
  15.             mins -= 60;
  16.         }
  17.  
  18.         if (hours == 24)
  19.         {
  20.             hours = 0;
  21.         }
  22.  
  23.         Console.WriteLine ("{0}:{01:00}", hours, mins);
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement