我不太清楚为什么我做不到
double a = (double) my_Function(45) / 2048 / 2340 / 90;
printf("%.4f",a); // prints out 0.00
但是我必须再使用一个变量:
double a = (double) my_Function(45);
double b = a / 2048 / 2340 / 90;
printf("%.4f",b); // prints out the correct value
最佳答案
my_Function 返回什么?也许您的答案小于 10^(-4)。
关于c - C 中的算术运算符和函数调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2909570/