As the script is it ment to get user input threw ID and hours worked. The only way to stop the loop is either type in quit and it will exit the script with no iformation being process. The advantage of using loops is to force a responce from the user, either fill in the ID or quit, fill Hours or quit. There is no point in processing information if the user skips adding it.