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,

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

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!