慕莱坞7170355
2020-02-10 16:16
#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;
}
可以把y的括号去掉试一试
#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;
}
正确的方法
C语言入门
926207 学习 · 20797 问题
相似问题