换一种形式
int x,y;
int a,b,c,d,e;
x = 10;
y = -3;
a=x+y;
b=x-y;
c=x*y;
d=x/y;
e=x%y;
printf("x+y=%d\n", a);
printf("x-y=%d\n", b);
printf("x*y=%d\n", c);
printf("x/y=%d\n", d);
printf("x%%y=%d\n", e);
return 0;
再定义五个变量不也可以?
int x,y;
int a,b,c,d,e;
x = 10;
y = -3;
a=x+y;
b=x-y;
c=x*y;
d=x/y;
e=x%y;
printf("x+y=%d\n", a);
printf("x-y=%d\n", b);
printf("x*y=%d\n", c);
printf("x/y=%d\n", d);
printf("x%%y=%d\n", e);
return 0;
再定义五个变量不也可以?
2018-08-02
举报