我尝试使用printf(“%.2lf”,R);但是它的值越来越近.如何获得所需的输出? (最好使用printf)
#include <math.h> ... printf("%.2f",floor(100 * R) / 100);