<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">class Complex {
    double im;
    double re;
    Complex(double re, double im) {
	this.re = re;
	this.im = im;
    }
    public Complex add(Complex A) {
	return new Complex(re+A.re,im+A.im);
    }
}

public class complex_add {
    public static void main(String args[]) {
	
	Complex[][][][] A = 
	{
	    {
		{
		    {new Complex(1,1), new Complex(2,1)},
		    {new Complex(0,1), new Complex(2,-1)},
		},

		{
		    {new Complex(1,1), new Complex(2,1)},
		    {new Complex(0,1), new Complex(2,-1)},
		},

	    }
	};

	Complex[][][][] B = 
	{
	    {
		{
		    {new Complex(5,4), new Complex(2,3)},
		    {new Complex(0,-1), new Complex(-2,-1)},
		},
		
		{
		    {new Complex(7,1), new Complex(2,4)},
		    {new Complex(0,3), new Complex(5,-1)},
		},

	    }
	};

	Complex[][][][] C = new Complex[4][4][4][4];

	for(int i=0; i&lt;A.length; i++)
	    for(int j=0; j&lt;A[i].length; j++)
		for(int k=0; k&lt;A[i][j].length; k++)
		    for(int l=0;l&lt;A[i][j][k].length; l++)
			
			C[i][j][k][l] = A[i][j][k][l].add(B[i][j][k][l]);
    }

}
</pre></body></html>