Well the incrementing shouldn't be too bad.
If you incremented by n seconds, then as long as n >= 60, increment by minutes instead and subtract 60 from n. When 0 <= n < 60, add that to the current number of seconds. If the result is >= 60, subtract 60 and increment minutes again.
Ditto for minutes & hours.
For hours, just subtract 24 from n until 0 <= n < 24, and then add that to hours. If the result >= 24, subtract 24.
There are more efficient ways to do this involving integer division and modulus operators, but loops are easy and none of this is going to be expensive.
The stuff in main() you should really have no trouble with.