Answer to Question #78919 in C++ for Shoaib Shafiq
Define the time structure, and write a program that obtains two time values from the user in 12:59:59 (using a string) format, stores them in struct time variables, converts each one to seconds (type int), adds these quantities, converts the result back to hours-minutes- seconds, stores the result in a time structure, and finally displays the result in 12:59:59 format. Note: The conversion from time format to seconds should be done in a function, a Time type variable would be passed to it, it would calculate the total number of seconds from that time to 00:00:00 and then return a structure variable.
Dear Shoaib Shafiq, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order