procedure high_devide(a,b:hp; var c,d:hp); var i,len:integer; begin fillchar(c,sizeof(c),0); fillchar(d,sizeof(d),0); len:=a[0];d[0]:=1; for i:=len downto 1 do begin multiply(d,10,d); d[1]:=a[i]; while(compare(d,b)>=0) do {即d>=b} begin Subtract(d,b,d); inc(c[i]); end; end; while(len>1)and(c.s[len]=0) do dec(len); c.len:=len; end;