Chapter 5 Computer Science
nested
A loop inside another loop is called a _____loop
infinite or endless loop
A loop that does not have a way of stopping
posttest loop
A loop that evaluates its test expression after each repetition
pretest loop
A loop that evaluates its test expression before each repetition
sentinel
A special value that marks the end of a series of values
running total
A sum of numbers that accumulates with each iteration loop
counter
A variable that counts the number of times a loop repeats
accumulator
A variable that is initialized to some starting value, usually zero, and then has numbers added to it in each iteration of a loop
iteration
Each repetition of a loop
initialization, test, update
For loops: first expression, second expression and third expression
postfix mode
The increment or decrement operator is place after the operand or to the right
prefix mode
The increment or decrement operator is placed before the operand or to the right
body
The statement or block that is repeated is known as the _ of the loop
while and for loops
These loops will not iterate at all if their test expressions are false to start with
do while loop
This loop always iterates at least once
continue
This statement causes a loop to skip the remaining statements in the current iteration
break
This statement causes a loop to terminate immediately
for loops
This type of loop is ideal for situations that require a counter
decrement
To __ a value a value means to decrease it by one
increment
To __ a value means to increase it by one