double保存小数点后两位

double getRound(double a){ return (int(a * 100 + 0.5)) / 100.0; };//利用的是强制转换

posted @ 2018-06-05 11:45  朱小勇  阅读(231)  评论(0编辑  收藏  举报