APL/Révisions/Structures/complexes.c

23 lines
306 B
C
Raw Permalink Normal View History

2022-01-25 12:00:33 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
struct complexe {
double x;
double y;
};
typedef struct complexe complexe;
double module(complexe z) {
return sqrt(pow(z.x, 2) + pow(z.y, 2));
}
complexe conjugue(complexe z) {
z.y = -z.y;
return z;
}
int main(void) {
}