Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <math.h>
    double ceil( double x );

Description:
    The ceil function (ceiling function) computes the smallest integer not
    less than x.

Returns:
    The ceil function returns the smallest integer not less than x,
    expressed as a double.

See Also:
    floor

Example:
    #include <stdio.h>
    #include <math.h>

    void main()
      {
        printf( "%f %f %f %f %f\n", ceil( -2.1 ), ceil( -2. ),
            ceil( 0.0 ), ceil( 2. ), ceil( 2.1 ) );
      }

    produces the following:

    -2.000000 -2.000000 0.000000 2.000000 3.000000

Classification:
    ANSI

Systems:
    All

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