Advertisement
North_Point

01.Sino The walker

Aug 15th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace _01.Sino_The_Walker
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             var timte = DateTime.ParseExact(Console.ReadLine(), "HH:mm:ss", CultureInfo.InvariantCulture);
  15.             var steps = decimal.Parse(Console.ReadLine());
  16.             var seconds = decimal.Parse(Console.ReadLine());
  17.  
  18.             var need = 60 * 60 * 24;
  19.             var day = (int)(steps * seconds % need);
  20.             var result =  timte.AddSeconds(day);
  21.  
  22.             Console.WriteLine("Time Arrival: {0:d2}:{1:d2}:{2:d2}", result.Hour , result.Minute ,result.Second);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement