Question
Write a function splitTime() that takes a time represented in seconds and returns the number of hours (0-23), the number of minutes (0-59) and
Write a function splitTime() that takes a time represented in seconds and returns the number of hours (0-23), the number of minutes (0-59) and the number of seconds (0-59). For example, if the time given is 6000 then it is 1 hour, 40 minutes and 0 second. Your function cannot access any global variables, i.e. all data exchange between the main program and your function splitTime() must be performed via parameter passing. for this question, you do not have to write the complete program. Please just write the required statements.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
You can write the function splitTime as follows publi...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started