#838. for嵌套if,break,continue
for嵌套if,break,continue
以下程序段的输出结果是({{ input(1) }} )
int x,y;
for(y=1,x=1;y<=50;y++)
{
if(x%2==1)
{
x+=5;
continue;
}
x-=3;
if(x>=0) break;
}
printf("%d\n",y);
以下程序段的输出结果是({{ input(1) }} )
int x,y;
for(y=1,x=1;y<=50;y++)
{
if(x%2==1)
{
x+=5;
continue;
}
x-=3;
if(x>=0) break;
}
printf("%d\n",y);
By signing up a 羽润编程 universal account, you can submit code and join discussions in all online judging services provided by us.