Page 769 - AP Computer Science A, 7th edition
P. 769

20. (D) Here is a trace of the values of x and y during execution. Note that the condition (y % x == 1) is never true in this example.
The while loop terminates when x is 4 since the test while (x > 5) fails.
 
































































































   767   768   769   770   771