Advertisement
Niicksana

Sino The Walker

Aug 25th, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3. using System.Linq;
  4.  
  5. namespace _01._Sino_The_Walker
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. // Programming Fundamentals Retake Exam - 6 January 2017
  12.  
  13. DateTime date = DateTime.ParseExact(Console.ReadLine(), "HH:mm:ss", CultureInfo.InvariantCulture);
  14. long steps = long.Parse(Console.ReadLine()) % 86400;
  15. long seconds = long.Parse(Console.ReadLine()) % 86400;
  16.  
  17. long timeSeconds = steps * seconds;
  18.  
  19. date = date.AddSeconds(timeSeconds);
  20.  
  21. Console.WriteLine($"Time Arrival: {date.Hour:d2}:{date.Minute:d2}:{date.Second:d2}");
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement