有以下程序:
#include <stdio.h>
void main() {
double x = 3.14159;
printf("%f\n", (int)(x * 1000 + 0.5) / (double)1000);
}程序运行后的输出结果是( )
3.141
3.141000
3.142000
3.142
有以下程序:
#include <stdio.h>
void main() {
double x = 3.14159;
printf("%f\n", (int)(x * 1000 + 0.5) / (double)1000);
}程序运行后的输出结果是( )
3.141
3.141000
3.142000
3.142