Thread: Some exercises
View Single Post
Old Jun 29th, 2005, 8:47 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
When you use part (or all) of the seconds to make the appropriate number of hours, you have to only use the remainder for the minutes, and the remainder of that operation for the seconds. You may find the modulus operator (%) useful for that.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote