mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
7 lines
196 B
C
7 lines
196 B
C
struct complex multiply(struct complex x, struct complex y) {
|
|
struct complex z;
|
|
z.real = x.real * y.real - x.imag * y.imag;
|
|
z.imag = x.real * y.imag + x.imag * y.real;
|
|
return z;
|
|
}
|