I made a small program to test out taking an input of a time in HHMMSSMMM (hours minutes second milliseconds) format, then displaying the hours, minutes, seconds, and milliseconds separately. I tried to make an error check to reject the input if it was longer than 9 digits, but the program gets stuck in an infinite loop with the code I currently have. I have no idea why this infinite loop is happening, any help would be appreciated!