[SOLVED] Traces

10.00 $

Category:

Description

5/5 - (1 vote)

1. Given the following code:

int i = 0; int x = 7;

int y = 13;

while (i < y) //(a)

{ if (i >= x)

{ System.out.print(i + ” “);

} i=i+2; //(b)

}

System.out.println();

i .What is the output?

ii. What is the final value for i?

iii. How many tines is condition (a) checked?

iv. How many tines is statenent (b) executed?