ITPub博客

首页 > 应用开发 > IT综合 > n间隔四舍六入

n间隔四舍六入

原创 IT综合 作者:jmqnwpu 时间:2008-09-25 09:29:01 0 删除 编辑
function TmainForm.tysswr(n,i:integer;s:string):string; //n间隔四舍六入
var temp:real;
t:string;
begin
temp:=strtofloat(s)/n;
t:=mainForm.sswr(floattostr(temp),i);
temp:=strtofloat(t)*n;
t:=mainForm.sswr(floattostr(temp),i);
result:=t;
end;[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11218608/viewspace-1011006/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    8
  • 访问量
    152991