单项选择题

设x和y均为int型变量,则执行下面的循环后,y值为( )。 public class Sun { public static void main(String args[ ]) { int x,y; for(y=1,x=1;y<=50;y++) { if(x>=10) break; if (x%2==1) { x+=5; continue; } x-=3; } System.out.println(y); } }

A.2
B.4
C.6
D.8