#include <math.h>
static double round(double r)
{
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
}
包含头文件,然后定义函数。。
#include <math.h>
static double round(double r)
{
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
}
包含头文件,然后定义函数。。