As you have already seen, a computer can be made to perform a program over and over again by using a GOTO loop. Sometimes it is difficult to break out of such a loop as the computer goes on indefinitely and this is not particularly useful. However, by adding a counter we can make the computer execute a program for a set number of times and then stop. This is illustrated in the following program, which is performed five times.
Unable to display preview. Download preview PDF.