Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>floor</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
floor

Usage

   #include <math.h>
   double floor (double x);

   ANSI

Description

   floor returns the largest integer (as a double- precision number) not
   greater than x.

Example 

   #include <stdio.h>
   #include <math.h>
   #include <stdlib.h>

   int main()
   {
       double d;
       d = floor(4.8);
       printf("The floor of 4.8 is %f\n",d);
       d = floor(-4.2);
       printf("The floor of -4.2 is %f\n",d);
       return EXIT_SUCCESS;
   }

Return Value

   floor returns the double result.

See Also

   ceil, fmod


See Also: ceil fmod

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson