自己写程序!
function Hand(num:double):double;
var temp:double;
begin
temp:=num*100;
if temp=int(num)*100 then
begin
Result:=temp/100;
end
else
Result:=(temp+1)/100;
end;
end;
function Hand(num:double):double;
var temp:double;
begin
temp:=num*100;
if temp=int(num)*100 then
begin
Result:=temp/100;
end
else
Result:=(temp+1)/100;
end;
end;
Var
I,AUnit:Integer;
Begin
AUnit:=1;
If DecimalNum>0 Then
I:=1 To DecimalNum Do AUnit:=AUnit*10;
AValue:=AValue*AUnit;
Result:=Trunc(AValue);
If Frac(AValue)>0 Then Inc(Result);
End;
if (Rund(num*100)/100 )>(trunc(num*100)/100) then
num=Rund(num*100)/100