double f1 = 7.9;
double f2 = 7.4;
double f3 = -7.1;
double f4 = -7.6;
double y;
y = floor(f1);//
y = floor(f2);
y = floor(f3);
y = floor(f4);
转载于:https://www.cnblogs.com/dalangtaosha/archive/2004/11/08/61712.html