I'm working on a code converting huge numbers, such as 9999 to 2:46:39 into this format HH:MM:SS. I do understand how to get 2 hour and kind of on 46 minutes, but not so much with 39 seconds. Can anyone please this explain this to me? When I tried a different number like 4555 seconds I get 1:15:55. I understand the hour part, but now I don't on 15 minutes and 55 seconds. I think only minutes and seconds are the only things that I'm not sure of.
I'm using % to get the remainder, but when I divide them 60, especially for 4555 I don't see any 15 or 55 seconds as a remainder when using normal division.
int min = ttlNumSec % MIN60;
int sec = ttlNumSec % MIN60;
Appreciate any help.
Edit: Thank you so much to all who replied and showing another ways of getting them :D