desislava777

Time + 15 Minutes

Jul 17th, 2017
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 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 ConsoleApplication58
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.           var hour = int.Parse(Console.ReadLine());
  14.          var minutes = int.Parse(Console.ReadLine());
  15.          
  16.          TimeSpan times = new TimeSpan(hour, minutes, 0);
  17.          TimeSpan times2 = new TimeSpan(0, 15, 0);
  18.          TimeSpan sumaTime = times + times2;
  19.  
  20.         Console.WriteLine("{0:h\\:mm}", sumaTime);
  21.         }
  22.      }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment