向上取整:Math.ceil(double a)
向下取整:Math.floor(double a)
四舍五入:Math.round(double a)
本文介绍了三种基本的数学运算方法:向上取整、向下取整及四舍五入。这些方法在编程中经常使用,通过Math库的ceil、floor和round函数实现。
向上取整:Math.ceil(double a)
向下取整:Math.floor(double a)
四舍五入:Math.round(double a)
2109
3万+

被折叠的 条评论
为什么被折叠?