Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         TimeSpan time = TimeSpan.Parse(Console.ReadLine());
  8.         int step = int.Parse(Console.ReadLine())% 86400;
  9.         int seconds = int.Parse(Console.ReadLine())% 86400;
  10.  
  11.         long sumStep = step * seconds;
  12.         TimeSpan asdf = TimeSpan.FromSeconds(sumStep);
  13.  
  14.         TimeSpan timeSum = time + asdf;
  15.  
  16.         Console.WriteLine("Time Arrival: {0:hh\\:mm\\:ss}", timeSum);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement