Every cycle, the value of y increases by 1, and the value of x changes once. So when you finally jump out of the loop, y==6.
First of all, we must understand the meaning of continue and break!