Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- class Program
- {
- static void Main()
- {
- var timeLeaving = Console.ReadLine().Split(':').Select(int.Parse).ToArray();
- long seconds = timeLeaving[2] + 60 * timeLeaving[1] + 60 * 60 * timeLeaving[0];
- var secondsToAdd =
- long.Parse(Console.ReadLine()) *
- long.Parse(Console.ReadLine());
- seconds = seconds + secondsToAdd;
- var secs = seconds % 60;
- var mins = (seconds / 60) % 60;
- var hours = (seconds / 60 / 60) % 24;
- Console.WriteLine("Time Arrival: {0:d2}:{1:d2}:{2:d2}",
- hours, mins, secs);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement