Advertisement
Guest User

Untitled

a guest
Feb 28th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace Sino_The_Wolker
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string inputtime = Console.ReadLine();
  11.             int steps = int.Parse(Console.ReadLine()) % 86400;
  12.             int timeofonestepinseconds = int.Parse(Console.ReadLine()) % 86400;
  13.             int timeadd = steps * timeofonestepinseconds;
  14.  
  15.             DateTime arrival = DateTime.ParseExact(inputtime, "HH:mm:ss", null);
  16.             string result = arrival.AddSeconds(timeadd).ToString("HH:mm:ss");
  17.             Console.WriteLine($"Time Arrival: {result}");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement