Packaging Quantities: Do it by hand

Our first step is to figure out how many days worth of seconds this is. So we divide 200,000 by (24*60*60):

days = 200,000/(24*60*60) = 2

Note that the result is two because we do an integer (not "decimal") division; what we want to know is how many whole days worth of seconds will go into 200,000.

Now we calculate how many seconds are left over after taking out two days worth of seconds.

remainder = 200,000 - 2*(24*60*60) = 27,200

Next we want to calculate how many hours worth of seconds this is. We do this similarly to the days calculation above.

hours = 27,200/(60*60) = 7

And find the remainder,

remainder = 27,200 - 7x(60*60) = 2000

Finally we calculate the number of minutes,

minutes = 2,000/60 = 33

and the remainder of that is the leftover seconds,

seconds = 2,000 - 33*60 = 20

So 200,000 seconds is equivalent to 2 days, 7 hours, 33 minutes and 20 seconds.

In terms of input, processing and output:

the input is the number of seconds (200,000),

the processing consists of several steps to find the number of days, hours, minutes and seconds, including intermediate steps to find the remainders along the way,

and the output is the number of days, hours, minutes and seconds.