代码
提交代码
#include <stdio.h> int main() { int a,b,c,e,f,g; float d,h,i,j,k; a=1; b=2; c=0; f=4; g=3; h=1; i=2; j=4; k=3; printf("a=%d, b=%d, c=%d, f=%d, g=%d\n",a,b,c,f,g); c=a+b; printf("a+b=%d\n",c); c=a-b; printf("a-b=%d\n",c); c=a*b; printf("a*b=%d\n",c); c=a/b; d=h/i; printf("a/b=%d, int\n",c); printf("h/i=%f, float\n",d); c=f/g; d=j/k; printf("f/g=%d, int\n",c); printf("j/k=%f, float\n",d); c=a%b; printf("a%%b=%d\n",c); c=b%a; printf("b%%a=%d\n",c); e=10; c=++e; printf("c=++e,c=%d, e=%d\n",c,e); e=10; c=e++; printf("c=e++,c=%d, e=%d\n",c,e); e=10; c=--e; printf("c=--e,c=%d, e=%d\n",c,e); e=10; c=e--; printf("c=e--,c=%d, e=%d\n",c,e); return 0; }
运行结果