实现对实数的四舍五入

例:对实数的小数点后两位进行四舍五入。

double x;//要四舍五入的值

x*=100;
x+=0.5;
x=(int)x;
x/=100;
原文地址:https://www.cnblogs.com/nylglqx/p/10054210.html