/* kertaus 4 */ #include struct complex { double re; double im; }; struct complex cprod(struct complex a, struct complex b) { struct complex p; p.re = a.re * b.re - a.im * b.im; p.im = a.re * b.im + a.im * b.re; return (p); } main() { struct complex a = {0, 1}, b = {0, 1}, c; c = cprod(a, b); printf("c.re = %lf, c.im = %lf\n", c.re, c.im); }