I am new to C++ - I wanted to make a program to add and subtract time using a HH:MM format. Sample Input:
12:00 + 3:00 - 6:00
Sample Output:
9:00
Another Sample Input:
9:00 + 8:00 + 13:00 - 2:25
Sample Output:
27:35
How do I got about this? I was thinking convert everything down to seconds and then apply the math then use a modulus 60 function to return the time. Any help on building such a program?