counter-controlled while loop
decision maker
an expression in an “if” statement, which determines whether to execute the statement that follows it
divisor
suppose that M and N are integers and M is nonzero. then M is called a divisor of N if N=MT for some integer T; that is, when M divides N, the remainder is 0
End-of-File (eof) controlled “while” loop
a “while” loop that stops when it reaches “|” at the end of the input file
Fibonacci number
a number in the Fibonacci sequence
Fibonacci sequence
a (sub) n = a (sub) n-1 + a (sub) n-2
flag variable
a Boolean variable used to control the execution of a “while” loop
flag-controlled “while” loop
uses a Boolean variable to control the execution of the loop
“for” loop (indexed loop)
- consists of an initialization statement, the loop condition, and the update statement
“for” loop control variable
- also called an indexed variable
infinite loop
a loop that continues to execute endlessly
loop control variABLE (LVC)
variable that controls the end of the loop
nesting
process that involves putting one control structure inside another
postest loop
a loop in which the loop condition is evaluated before executing the body of the loop
sentinel
an arbitrary value used to stop the execution of a loop
sentinel-controlled “while” loop
a “while” loop that uses a sentinel value to end the loop