215做网站,程序员用的编程软件,一键建网站,如何速发布wordpress负数的四舍五入
标签:基础
System.out.println(Math.round(-0.2));
System.out.println(Math.round(-0.5));
System.out.println(Math.round(-0.6));0
0
-1理解:四舍五入,找一个离目标小数近的整数,-0.2和0近,-0.6和-1近,中间的往右靠负数的四舍五入
标签:基础
System.out.println(Math.round(-0.2));
System.out.println(Math.round(-0.5));
System.out.println(Math.round(-0.6));0
0
-1理解:四舍五入,找一个离目标小数近的整数,-0.2和0近,-0.6和-1近,中间的往右靠