Answer:
Counter initialization: .
Conditional statement: .
Counter modification: .
Explanation:
In the current Java for-loop in this question:
The even integers between and includes . It would be necessary to add each time to get to the next number.
Since the list of even integers starts at , it would be necessary to initialize the counter variable to rather than . Thus, replace the counter initialization statement with .
The maximum integer that this loop should print is still . Thus, the conditional statement does not need to be changed.
The for-loop should add to the counter each time to get to the next even integer. Thus, the counter modification statement (or equivalently, ) should be replaced with .
Overall, the for-loop should be:
.
5.4m questions
7.0m answers