Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question 39 1 pts how many times will the following for loop be execute…

Question

question 39
1 pts
how many times will the following for loop be executed?
for (int count = 10; count <= 21; count++) system.out.println(\java is great!\);
0
12
10
11

Explanation:

Step1: Identify start and end values

The loop starts with count = 10 and ends when count = 21.

Step2: Calculate number of iterations

The number of iterations is 21 - 10+ 1.
$21 - 10+1=12$

Answer:

12