Professional Documents
Culture Documents
Study Quest Loop Test
Study Quest Loop Test
Study Quest Loop Test
What are the first and last numbers printed by the following program segment?
for (int x = 0; x <= 987654; x++)
System.out.print((x+1) + );
How do I include more than 1 program statement in the body of a loop?
If you know you want to repeat a process exactly 10 times, what loop structure would
you use?
If you know you want to repeat a process until a user enters the value integer 999, what
loop structure would you use?
What is a conditional expression?
I am answering multiple choice questions dealing with loops. Each question includes the
code for the loop. The answers show possible printed output from the loops. What
strategies might I use to eliminate possible answers?
Does indentation affect the execution of a loop?