Answer:
Add the line numItems=numItems-1 after the 3rd code line.
Step-by-step explanation:
As the loop is not terminating thus the counter is to be added such that the value is decreased in each iteration. As the last item is entered the value will become 0. Now when the loop will again reach the while point, the condition will become false and thus the loop will be terminated.