c++四舍五入的新方法

将原来的数加上0.5,如果是需要进位的加上0.5就进位了,如果不需要进位的加上0.5也小于1,被int型省略掉。

原文地址:https://www.cnblogs.com/mcyushao/p/9130174.html