Translations of this page?:

ceil

语法:

    #include <cmath>
    double ceil( double num );

ceil() 函数返回不小于num的最小整数。例如,

     y = 6.04;
     x = ceil( y );

将会设置x为 7.0.

C++ 也提供了下列重载形式:

    #include <cmath>
    float ceil( float num ); // same as ceilf() in C99
    long double ceil( long double num ); // same as ceill() in C99

相关主题: floor, fmod

 
• • • SitemapRecent changesRSScc