Question: For each of the following while loops, state how many times the loop will execute its body. Remember that zero, infinity, and unknown are legal
For each of the following while loops, state how many times the loop will execute its body. Remember that “zero,” “infinity,” and “unknown” are legal answers. Also, what is the output of the code in each case?
a.

b.

c.

d.

e.

f.

int x = 1; while (x < 100) { System.out.print (x + "); x += 10;
Step by Step Solution
3.38 Rating (154 Votes )
There are 3 Steps involved in it
a Executes body 10 times Output is 1 11 21 31 41 51 61 ... View full answer
Get step-by-step solutions from verified subject matter experts
