I need to convert hours into weeks, days, and hours.
My professor was hinting that there might be a way to
do this using the modulus operator but I can't seem to think of a way
that its possible. Can anyone help?
modulus operator returns the remainder of the division. you already know this correct?
EDIT:
the first step is to define end goal of your program.
you can show us, either in real or psuedo code, or written statement, how you would define this end goal.
and don't forget to wrap your code inside [code] your code goes here[/code]
Last edited by potatoCode; January 20th, 2010 at 09:56 PM.
Well, the time_t structures is seconds since Jan 1st, 1970 at midnight GMT. There are 60 seconds in a minute, so time % 60 will give you the current seconds. From there you should be able to figure it out.
Bookmarks