Question: The following program splitTime.c is used to split a time in seconds into the equivalent time in hours (0-23), minutes (0-59), and seconds (0-59), respectively.

 The following program splitTime.c is used to split a time in

The following program splitTime.c is used to split a time in seconds into the equivalent time in hours (0-23), minutes (0-59), and seconds (0-59), respectively. But it is incomplete. Please complete the program. Sample output: Enterseconds:2345 Converted format 0 hour 39 mins 5 secs Enter seconds: 3601 Converted format 1 hour 0 mins 1 secs #include // Write the declaration of function split_time int maino int n,hr,min,sec; printf ("Enter seconds:" scanf ( " %d" , &n ) ; /* Write the statement to call split_time * printf( "converted format: %d hour %d mins %d secs", /* write the corresponding expressions return 0 void split time(long total sec, int *hr, int *min, int *sec) /* Write the statements to calculate hr, min and sec*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!