Floor function floor (x), sometimes it is also written as floor (x), its function is "rounding", or "rounded down", that is, take the largest integer not greater than X (and "Rounding", the next rounding is directly remove the decimal part), such as: X=3. 14,floor (x) =3 Y=9.99999,floor (y) =9 in the C language library function, the syntax of the floor function is as follows: #include <math.h> double floor (double arg); Function: function returns the largest integer with an argument not greater than ARG. For example, x = 6.04; y = floor (x); The value of Y is 6.0. The floor function corresponds to the Ceil function, which is the upper integer function. Ceil function
The role of the Ceil function is to find the smallest integer that is not less than the given real number.
Ceil (2) =ceil (1.2) =cei (1.5) =2.00
Use this function to include the header file <math.h> The function returns a double type
Note: According to authoritative data, the return values of the floor function and the Ceil function are double type