#include
int main() {
double complex a[2][3] = {complex(1,2),2,3,
4,5,6};
array double complex b[3][4] = {1,2,3,4,
5,6,7,8,
1,2,3,4};
array int b1[3][4] = {1,2,3,4,
5,6,7,8,
1,2,3,4};
array double complex csumv1[2], csumv2[3];
csum(a, csumv1);
printf("csum(a, csumv1) = %f\n", csumv1);
csum(b, csumv2);
printf("csum(b, csumv2) = %f\n", csumv2);
csum(b1, csumv2);
printf("csum(b1, csumv2) = %f\n", csumv2);
}
csum(a, csumv1) = complex(6.000000,2.000000) complex(15.000000,0.000000)
csum(b, csumv2) = complex(10.000000,0.000000) complex(26.000000,0.000000) complex(10.000000,0.000000)
csum(b1, csumv2) = complex(10.000000,0.000000) complex(26.000000,0.000000) complex(10.000000,0.000000)