应该是if的嵌套if(a>b) //这一步不满足,程序跳过 if(b printf("%d",d+++1); else //不知道你的else写在哪里,如果跟if(b printf("%d",++d+1);printf("%d\n",d);运行结果:2