function ARoundN(v: Double; n: Integer): Double; var I:Integer; begin result:=v; for I:=0 to n-1 do begin result:=result*10; end; result:=Round(result); for I:=0 to n-1 do begin result:=result/10; end; end;
标签:四舍五入 小数点 begin for 问题 小数 blog function var
function ARoundN(v: Double; n: Integer): Double; var I:Integer; begin result:=v; for I:=0 to n-1 do begin result:=result*10; end; result:=Round(result); for I:=0 to n-1 do begin result:=result/10; end; end;
标签:四舍五入 小数点 begin for 问题 小数 blog function var
原文地址:https://www.cnblogs.com/westsoft/p/8449603.html