有小数的时候,答案居然不对,谁告诉我这是怎么算出来的
#include <stdio.h>
int main()
{
int a,b,c,d;
double result;
a = 1;
b = 2;
c = 3;
d = 4;
result = a + c / d * b; //答案居然不对,谁能告诉我
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 + c / d * b; //答案居然不对,谁能告诉我
printf("%f\n", result);
return 0;
}
2018-04-03
举报