import java.awt.image.DataBufferByte;import java.text.DecimalFormat;public class duioxiangshicheng { static void poiay(double[] A,int m,double[] B,int n,double[] R,int k){ int i,j; for(i=0;i<k;i++){ R[i]=0.0; } for(i=0;i<m;i++){ for(j=0;j<n;j++){ R[i+j]=A[i]+B[j]; } } } public static void main(String[] args) { int i; double A[]={-4.0,5.0,2.0,-1.0,3.0,2.0}; double B[]={-3.0,-2.0,1.0,3.0}; double[] R=new double[9]; DecimalFormat df=new DecimalFormat("0.0000000E000"); poiay(A,6,B,4,R,9); System.out.println("多项式A*B的结果各项系数:"); for(i=0;i<9;i++){ System.out.println("R("+i+")="+df.format(R[i])); } }}