高精度乘以高精度procedure high_m

17 查阅
高精度乘以高精度procedure high_multiply(a,b:hp; var c:hp}var i,j,len:integer;

参考答案:

正确答案:

\r\n

begin
fillchar(c,sizeof(c),0);
for i:=1 to a[0] do
for j:=1 to b[0] do begin
inc(c[i+j-1],a[i]*b[j]);
inc(c[i+j],c[i+j-1] div 10);
c[i+j-1]:=c[i+j-1] mod 10;
end;
len:=a[0]+b[0]+1;
while (len>1)