当输入 3 为什么是 4 不是 3 ?
#include<stdio.h>main()
{int x;
scanf("%d",&x);
if(x++>5)
printf("%d",x);
else printf("%d\n",x--);
}
2014-06-22 16:16
2014-06-22 16:50
2014-06-22 16:58
程序代码:
#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) ......

2014-06-22 17:00
2014-06-22 17:39
2014-06-22 19:31
2014-06-23 00:51
2014-06-23 00:51
2014-06-23 00:53
2014-06-23 00:55