c语言 float 保留小数点后两位数字时间:2025-02-15 12:13:33 挺实用的小技巧。 float sp = 36.51647; sp=( (float)( (int)( (sp+0.005)*100 ) ) )/100;