为什么这样子计算的结果不一样
#include <stdio.h>
int main()
{
int x,y;
x = 10;
y = -3;
printf("x+y=%d\n" );
printf("x-y=%d\n" );
printf("x*y=%d\n", x*y );
printf("x/y=%d\n", x/y );
printf("x%%y=%d\n", x%y );
return 0;
}
#include <stdio.h>
int main()
{
int x,y;
x = 10;
y = -3;
printf("x+y=%d\n" );
printf("x-y=%d\n" );
printf("x*y=%d\n", x*y );
printf("x/y=%d\n", x/y );
printf("x%%y=%d\n", x%y );
return 0;
}
2018-09-28
举报