chap 4 Flashcards

1
Q

the ____ loop allows the user to decide on the number of iterations

A

user controlled loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A count-controlled for loop must have what three elements

A
  1. It must initialize a control variable to a starting value
  2. It must test the control variable by comparing it to a maximum value. When the control variable reaches its maximum value, the loop terminates
  3. it must update the control variable during each iteration. This is usually done by incrementing the variable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly