floor(-2.5) = -3
floor()是向负无穷大舍入,floor(-2.5) = -3;ceil()是向正无穷大舍入,ceil(-2.5) = -2。
两者都要引用 #include <math.h>库