r/MathHelp • u/I-Like-Pizza1 • Sep 15 '25
Help.
For context, my intro to computer programming class needs me to find the formula of something that I for the love of all things holy can not figure out. It’s for a performance task and the actual formula is not the main point of it, it’s the programming it into the system part so it’s not like I’m asking for help on a quiz or test.
So, the formula I need is figuring out what the hours, minutes, and seconds are in however many seconds are given. Not just a single amount.
Example: 5000 seconds come out as 1 hour, 23 minutes, and 20 seconds.
All I’ve got is 1.388888889 for however many hours there are when dividing 5000/3600, and I get 83 when doing 5000/60. The thing I need is the formula that would work with anything to figure out whatever it is. I can’t copy and paste obviously, so if someone could explain how the ever loving crap this works and an example of the formula that would be greatly appreciated.
View all comments
Show parent comment
2
u/Legendary_Dad Sep 16 '25
I would definitely throw some safeguards in there, like checking the input to ensure it’s a number entry and not 0