#include <math.h>
double ceil(double x);
#include <stdio.h>
#include <math.h>
int main()
{
double value[] = {3.23, 4.10, 5.88, 10.50};
int i;
for (i = 0; i < 4; i++)
printf ("%f => %f\n", value, ceil(value));
return 0;
}
./ceil
3.230000 => 4.000000
4.100000 => 5.000000
5.880000 => 6.000000
10.500000 => 11.000000
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |