57.7k views
5 votes
Which of the following for-loop headers results in equivalent numbers of iterations: A. for (int q = 1; q <= 100; q++) B. for (int q = 100; q >= 0; q--) C. for (int q = 99; q > 0; q -= 9) D. for (int q = 990; q > 0; q -= 90) a. A and B. b. C and D. c. A and B have equivalent iterations and C and D have equivalent iterations. d. None of the loops have equivalent iterations.

User Empyrean
by
7.2k points

1 Answer

3 votes

Answer:

b

Step-by-step explanation:

C and D have equivalent iterations

C: D:

99 990

90 900

81 810

72 720

63 630

54 540

45 450

36 360

27 270

18 180

9 90

User CristianGuerrero
by
6.8k points