函数名: floor
功 能: 向下舍入
用 法: #include <math.h>
double floor(double x);
程序例:
#include <stdio.h>
#include <math.h>
int main(void)
{
double number = 123.54;
double down, up;
down = floor(number);
up = ceil(number);
printf("original number %10.2lf\n", number);
printf("number rounded down %10.2lf\n", down);
printf("number rounded up %10.2lf\n", up);
return 0;
}