Deviopath › Go

Minutes to Clock

Easy · Numbers

/ on int is truncating division, % is the remainder. fmt.Sprintf("%02d", m) pads minutes to two digits.

Write Clock(minutes) that converts a total number of minutes (which may be 60 or more) to "H:MM". 75 becomes "1:15". Hours are not padded.

Next: Weekday Name