This is how it works.
1.first time x=0 and y=0,so it checks condition x==y,it is true so it continues with the inner loop incrementing y.
2.now x=0,y=1,now the
test case is false and it prints out the value of x and y i.e 0 and 1.
3.Again y is incremented,so x=0 and y=2,test case is false and prints the value of x=0 and y=2.
4.Now the inner loop is completed as test condition is y<3,so now it continues with the outer loop so now x=1 and y=0 and it prints this value.
5.now the inner y loop is incremented i.e for x=1 and y=1 ,test case is true so it continues with the inner loop.
6.now x=1,y=2 and it prints the value.so now both inner and outer loop are completed.
7.the valued printed are x=0,y=1
x=0,y=2
x=1,y=0
x=1,y=2