Advertisement
Guest User

SinoTheWalkerWorking

a guest
Jul 5th, 2017
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3. using System.Numerics;
  4.  
  5. namespace SinoTheWalker
  6. {
  7.     class MainClass
  8.     {
  9.         public static void Main(string[] args)
  10.         {
  11.             string leaveTime = Console.ReadLine();
  12.             DateTime leave = DateTime.ParseExact(leaveTime, "HH:mm:ss", CultureInfo.InvariantCulture);
  13.             decimal steps = decimal.Parse(Console.ReadLine());
  14.             decimal timePerStep = decimal.Parse(Console.ReadLine());
  15.  
  16.             BigInteger seconds = ((BigInteger)(steps * timePerStep))%86400;
  17.             leave = leave.AddSeconds((int)seconds);
  18.             Console.WriteLine($"Time Arrival: {leave:HH:mm:ss}");
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement