1
0
Fork 0
mirror of https://gitlab.com/mfocko/CodeWars.git synced 2024-09-18 21:56:57 +02:00
CodeWars/5kyu/human_readable_time/solution.cs

15 lines
316 B
C#
Raw Permalink Normal View History

using System;
public static class TimeFormat
{
public static string GetReadableTime(int seconds)
{
var hours = seconds / 3600;
seconds %= 3600;
var minutes = seconds / 60;
seconds %= 60;
return String.Format("{0:00}:{1:00}:{2:00}", hours, minutes, seconds);
}
}