123456789101112131415



Question 1: What gets printed when the following is compiled. Select the one correct answer.
<% int y = 0; %>
<% int z = 0; %>

<% for(int x=0;x<3;x++) { %>
<% z++;++y;%>
<% }%>

<% if(z<y) {%>
<%= z%>
<% } else {%>
<%= z - 1%>
<% }%>

1. 0
2. 1
3. 2
4. 3