Advertisement
knikolov98

Untitled

Sep 11th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3.    public class myclass
  4.     {
  5.         public static void Main(string[] args)
  6.         {
  7.            var hour = int.Parse(Console.ReadLine());
  8.             var min = int.Parse(Console.ReadLine());
  9.            
  10.             var sum =((hour*60) + min +15);
  11.             var  resulthour = sum/60;
  12.             if (resulthour >= 24)
  13.             {
  14.                 resulthour -= 24;
  15.             }
  16.             var resultmin = sum % 60;
  17.        
  18.             Console.WriteLine("{0}:{1:00}",resulthour,resultmin);
  19.        }
  20.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement