1
0
Fork 0
mirror of https://gitlab.com/mfocko/CodeWars.git synced 2024-11-22 08:33:48 +01:00
CodeWars/5kyu/human_readable_time/solution.cs
Matej Focko fc899b0b02
chore: initial commit
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-28 16:19:58 +01:00

14 lines
316 B
C#

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);
}
}