6.7k views
1 vote
Which of the following will not loop exactly 10 times? for (int x=0; x<10; x++) {} for (int x=1; x<=10; x++) {} for (int x=0; x<=10; x++) {} for (int x=2; x<=20; x +=2) {}

18 points

User Udani
by
8.5k points

1 Answer

1 vote

for (int x=0; x<=10; x++) {}

This will loop 11 times as it begins at zero and loops all the way up to and including ten. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.

User Keavon
by
8.1k points

No related questions found