From the previous program, the WHILE loop in the program uses a condition to loop long as the user does not select the number 4.
As long as the user selects a valid option other than 4, the menu is displayed repeatedly.
If, however, the user selects the number 4, the loop exits and the next statement following the loop’s closing brace is executed.