#include <stdio.h>
main()
{
int x=15;
while(x<49)
{x++;
while(x++<25)
if(x%3)
{x++;break;}
else continue;
}
printf("%d\n",x);
}
如何解读下面c语言程序? 我都快被绕蒙圈了
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
qzjhjxj 2022-09-14 22:43关注把代码格式化,首行缩进的方式,增加输出语句,查看变量变化的过程,供参考:
#include <stdio.h> int main() { int x=15; while(x<49) { x++; printf("1:x=%d\n",x); while(x++<25){ printf("2:x=%d\n",x); if(x%3) { printf("3:x=%d\n",x); x++; break; } else continue; } } printf("%d\n",x); return 0; }
本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用