http://www.tommstudio.com(2001年4月19日) 作者:booktian 推荐:booktian
下面是保岛国整数的四舍五入函数,如果要保岛国n位小数,只需简单修改。 function myround(x : extended) : extended; begin if (int(x)*10+5) > int(x*10) then begin result := floor(x); end else begin result := ceil(x); end; end;
没有相关教程