17 lines
226 B
C
17 lines
226 B
C
#include "stdio.h"
|
|
|
|
typedef struct {
|
|
double real;
|
|
double imag;
|
|
} Complex;
|
|
|
|
void complex_print(Complex z) {
|
|
printf("%f + %f i", z.real, z.imag);
|
|
}
|
|
|
|
int main() {
|
|
Complex z = {2.0, 4.0};
|
|
complex_print(z);
|
|
return 1;
|
|
}
|