Advertisement
filipovv

SinoTheWalker

Jul 4th, 2017
143
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Globalization;
  3.  
  4. namespace SinoTheWalker
  5. {
  6.     class MainClass
  7.     {
  8.         public static void Main(string[] args)
  9.         {
  10.             string leaveTime = Console.ReadLine();
  11.             DateTime leave = DateTime.ParseExact(leaveTime, "HH:mm:ss", CultureInfo.InvariantCulture);
  12.             int steps = int.Parse(Console.ReadLine());
  13.             int timePerStep = int.Parse(Console.ReadLine());
  14.  
  15.             int seconds = steps * timePerStep;
  16.             leave = leave.AddSeconds(seconds);
  17.             Console.WriteLine($"Time Arrival: {leave:HH:mm:ss}");
  18.         }
  19.     }
  20. }
Advertisement
RAW Paste Data Copied
Advertisement