当输入 3 为什么是 4 不是 3 ?
#include<stdio.h>main()
{int x;
scanf("%d",&x);
if(x++>5)
printf("%d",x);
else printf("%d\n",x--);
}
程序代码:
#include<stdio.h>
main()
{int x;
scanf("%d",&x);
if(x++>5) //问题在这.这里执行了一次x=x+1.
printf("%d",x);
else printf("%d\n",x--);
}
程序代码:...... if((x+1)>5) ......
