为什么这样运算结果是错的?%d不是取整吗?
#include <stdio.h>
int main()
{
int a,b,c,d;
double result;
a = 1;
b = 2;
c = 3;
d = 4;
result = a + b - c + d; //在这里体验哦~
printf("%d\n", result);
return 0;
}
#include <stdio.h>
int main()
{
int a,b,c,d;
double result;
a = 1;
b = 2;
c = 3;
d = 4;
result = a + b - c + d; //在这里体验哦~
printf("%d\n", result);
return 0;
}
2019-07-22
举报