这个计算结果哪出问题了,我理解:1+2*3/4=2.5才对,会什么输出是2
#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("%f\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("%f\n", result);
return 0;
}
2020-01-18
举报