2 回答include <stdio.h> int main() { int x,y; x = 10; y = -3; printf("x+y=%d\n", x+y ); printf("x-y=%d\n", x-y ); printf("x*y=%d\n", x*y ); printf("x/y=%d\n", x/y ); printf("x%y=%d\n", x%y ); return 0;
2 回答#include <stdio.h> int main() { int x,y; x = 10; y = -3; printf("x+y=%d\n", x+y ); printf("x-y=%d\n", x-y ); printf("x*y=%d\n", x*y ); printf("x/y=%d\n", x/y ); printf("x%y=%d\n", x%y ); return 0;
2015-09-15
x++是先取x的值為輸出值也就是說(shuō)輸出值是初始a的值,運(yùn)算結(jié)果a+1不是輸出值。
++x是先將a的值加1然后將這個(gè)加1的值作為輸出值即輸出值是a+1,運(yùn)算結(jié)果也是a+1。
2015-08-14
不一樣,一個(gè)是先用了再加,一個(gè)是先加了再用