为什么结果为2,不是2.5
#include <stdio.h>
int main()
{
int a,b,c,d;
double result;
a = 1.0;
b = 2.0;
c = 3.0;
d = 4.0;
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.0;
b = 2.0;
c = 3.0;
d = 4.0;
result = a + b * c / d; //在这里体验哦~
printf("%f\n", result);
return 0;
}
2023-05-21
举报