将原来的数加上0.5,如果是需要进位的加上0.5就进位了,如果不需要进位的加上0.5也小于1,被int型省略掉。
c++四舍五入的新方法
猜你喜欢
转载自www.cnblogs.com/mcyushao/p/9130174.html
今日推荐
周排行