Can anyone help me with this program I am kind a stuck, I have no idea what I have to do or where to start with because my tutor did not show me how to do this due to covid I can not come to school, but he want me to finish this.
This is the topic
Write a program that reads two times (each time in hours, minutes and seconds using a 24 hour format and using a colon as a delimiter (i.e. read as a C-style string), eg 13:44:33 ) where the second time is later than the first time. Calculate the elapsed time between the two times, giving this in hours, minutes and seconds.
Thankyou very much
What have you done so far?
Show your code with code tags.
Where are you stuck?
Can you work out the problem using pencil and paper?
If you were given this problem, you should already know how to read data from a file.
You can read each time as a string and then break it apart, or you can input each time field by field. Your choice.
Convert the times to a common format, such as seconds elapsed since midnight.
Subtract the earlier time from the later time.
That gives you the elapsed seconds between the two times.
Convert the elapsed seconds to something suitable for display.
Display the difference.
What's so hard?
Here is a start but it needs to be expanded to get the second time and then, use the two sets of values to do the subtraction. Look up the functions if you aren't clear on what they are doing. There is a reference section on this site. Doing that calculation on paper first will help, especially where 'borrow/carryovers' are required.
I can tell you that now to find experts in lead generation is very difficult for the site, the code is important of course, but also without leads that there is nothing to do. That is why I recommend everyone to look and read in detail the information about https://wow24-7.io/lead-generation , I highly recommend reading it and there will be no problems. I hope I was able to help. Good luck!