109k views
5 votes
Which of the following is required for counter-controlled repetition?

A. a boolean
B. a method
C. a condition
D. All of the above

User Clowwindy
by
8.2k points

1 Answer

5 votes

Answer:

The correct answer is letter "D": All of the above.

Step-by-step explanation:

Counter-controlled repetitions take place when executions are already known. They require a loop counter, the initial value of the control variable, the increment by which the control variable is changed, and the loop continuation condition that allows finding out if the loop will continue.

Boolean, methods, and conditions are needed for counter-controlled repetitions.

User Slohrsh
by
7.9k points