Math(初学)

package day01;

public class Case12 {
public static void main(String[] args) {
System.out.println(Math.abs(-3.14));//绝对值
System.out.println(Math.ceil(3.9));//向上取整
System.out.println(Math.floor(3.1));//向下取整
System.out.println(Math.round(20.4));//四舍五入
System.out.println(Math.PI);
}
}
posted @ 2019-04-08 17:30  py-clj  阅读(152)  评论(0编辑  收藏  举报