Question: Language is C++ Create a structure called time. Its three members, all type int, should be called hours, minutes, and seconds. Write a function time_to_secs(Time

Language is C++
Create a structure called time. Its three members, all type int, should be called hours, minutes, and seconds. Write a function time_to_secs(Time t1) that takes as its only argument a structure of type time, and returns the equivalent in seconds (type long). long totalsecs = ti.hours*3600 + ti.minutes*60 + ti.seconds Write a function secs_to_time(long seconds) that takes as its only argument a time in seconds (type long), and returns a structure of type time. Main function is already given
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
