Program Nhan_da_thuc;
Var m,n,i,j:byte;
A, B, C: array[0..10] of real;
Begin
Write(‘ Nhap bac cua da thuc A: ‘); Readln(m);
For i:= m downto 0 do
Begin
Write(‘A[‘,i,’]= ‘); Readln(A[i]);
End;
Write(‘ Nhap bac cua da thuc B: ‘); Readln(n);
For i:= n downto 0 do
Begin
Write(‘B[‘,i,’]= ‘); Readln(B[i]);
End;
For i:=0 to m+n do C[i]:=0;
For i:=0 to m do
For j:=0 to n do C[i+j]:=C[i+j]+A[i]*B[j];
For i:= m+n downto 0 do if C[i]<>0 then Write(C[i]:3:1,’x^’,i,’ + ‘);
Readln
End.