标签:
#include "stdafx.h"
#include <math.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
double a = 77.001;
double b = ceil(a);
printf("b = %.3f\n",b);
double c = 77.999;
double d = floor(c);
printf("d = %.3f\n",d);
return 0;
}
输出:
b = 78.000
d = 77.000
Press any key to continue
标签:
原文地址:http://blog.csdn.net/djb100316878/article/details/46342883