FIT   100
© Copyright University of Washington 1999-2000
Repeating Terms
vIteration is the repeated execution of a series of statements in programming
vTo perform iteration, programming languages include special statements often called iteration statements
vThere are two crucial components of all iterations:
oThe statements that will be repeated -- called the loop body
oA test specifying when to repetition stops -- termination test
vAdditionally, loops typically have at least one variable that is explicitly changed “inside” the loop -- this is called the iteration variable
o
Some value must change between consecutive iterations, or else the loop will never terminate … it is an infinite loop