Hint: You may notice that the loop variable changes in order and can serve as an indication of how we enter the number. Therefore, you can save the value of the loop variable when a certain condition