C camcap Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #1 我想将一个小数四舍五入成为一个整数,例如x=5.46 我想将它四舍五入为整数6. 请问该怎么做?请指教,谢谢![]
W windbell Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-24 #2 你那叫四舍五入吗?不过要实现也不难 round((5.46*10))/10
C creation-zy Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-25 #4 function BigNum(fouble):Integer; begin Result:=Trunc(f); if Result<>f then Inc(Result); end;
U ugvanxk Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-25 #5 if x-trunc(x)>0 then n:=trunc(x)+1 else n:=trunc(x)
I ICDB Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-25 #6 int(x+0.99999999999999999999)
I imok Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-25 #8 USES MATH; var i:integer; i:=ceil(5.46);