There are ways to stop the iteration of a loop. One method is for the loop to count its iterations. When the count reaches a given value the iteration stops. Another way to stop a lop is by use of a sentinel value. When the loop detects the presence of the sentinel, the loop stops iterating. This program demonstrates how to use Control+D as sentinel.