How would I set up this code?

For my homework, we have to do this.
http://prntscr.com/birkvl

I'm just not sure how to setup the mathematical expressions that would help me calculate the days, hours, minutes, and remaining seconds in the code.
here's the mathematical setup

days=seconds/86400

hours=seconds/3600

minutes=seconds/60


Hope now you can code it by yourself

Don't I have to calculate the remaining seconds?
well, if you will use float/double it will be calculated in decimals

for eg. for 90061 seconds

it will be 1.04237 days

25.0168444 hours and so on
closed account (48T7M4Gy)
Integers and modular arithmetic /, % ?
Ah, so finding the remaining seconds isn't a calculation on its own

For eg

remaining seconds=?

They just want to know the remaining seconds left after being divided by 86400,3600,and 60?
closed account (48T7M4Gy)
Eg if you had 45 days then they convert to 45/7 weeks and 45%7 days remainder. That's provided all variables are int's
Topic archived. No new replies allowed.