Help with Military Time Code Coach c++ [Solved]
Code attached. Task is described in attached file, below the code. Code passes all but test #4 (hidden). I have tried every possible combination to test this. Obviously the most important places to test are where the time transitions. Ex. 11:59 AM to 12:00 PM (12:00) 11:59 PM (23:59) to 12:00 AM (00:00) 9:00 PM (21:00) to 10:00 PM (22:00) etc. I know the code could likely be better and more efficient (I'm a newbie and want to first use methods covered in the course), but first I need to know *why* it's failing. Then I'll ask about other methods, once I feel I've solved the task myself. Regardless of method, if it's failing I need to figure out where the error is. The code outputs (for ex.) 00:10 (12:00 AM input) 01:10 thru 09:10 10:10 11:10 12:10 13:10 (1:00 PM input) thru 23:10 then back to 00:00 So I'm completely stumped here. Any suggestions regarding why it may be failing only test#4 greatly appreciated.