Floor Function

  • It returns the largest integer (represented as a floating-point value) not greater than num.
  • On a number line , this means the left integer value for the given number .

  • Syntax:

    float floorf(float num);
    double floor(double num);
    long double floorl(long double num);


    #include <math.h>
    #include <stdio.h>
      int main()
           printf("%f", floor(12.4));
           printf("%f", floor(-10.9));
           printf("%f", floor(0.9));
           printf("%f", floor(-1.9));
     return 0;