1
0
Fork 0
mirror of https://gitlab.com/mfocko/CodeWars.git synced 2024-11-09 11:09:07 +01:00
CodeWars/5kyu/human_readable_time/solution.cs

15 lines
316 B
C#
Raw 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);
}
}