- 舍掉小数取整:Math.floor(5.5)=5
- 四舍五入取整:Math.rint(5.5)=6
- 进位取整:Math.ceil(6.1)=7
- 取绝对值:Math.abs(-4.5)=4.5
- 取余数:A%B = 余数
JAVA 对50取余数
在JAVA中"/“是取整,”%"是取余,那要是想算类似x÷y=0.z怎么算?
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M