// 四舍五入
inline int round(double x)
{
return floor(0.5+x);
}
int _tmain(int argc, _TCHAR* argv[])
{
int x1 = round(5.8);
int x2 = round(-5.8);
int x3 = round(5.3);
int x4 = round(-5.3);
return 0;
}
// 四舍五入
inline int round(double x)
{
return floor(0.5+x);
}
int _tmain(int argc, _TCHAR* argv[])
{
int x1 = round(5.8);
int x2 = round(-5.8);
int x3 = round(5.3);
int x4 = round(-5.3);
return 0;
}