Advertisement
Kuncavia

Time15Minutes

Sep 14th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _09.Time_15Minutes
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var hour = int.Parse(Console.ReadLine());
  14.             var min = int.Parse(Console.ReadLine());
  15.  
  16.             var sum = ((hour * 60) + min + 15);
  17.             var resulthour = sum / 60;
  18.             if (resulthour >= 24)
  19.             {
  20.                 resulthour -= 24;
  21.             }
  22.             var resultmin = sum % 60;
  23.  
  24.             Console.WriteLine("{0}:{1:00}", resulthour, resultmin);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement