#include <stdio.h>
#include <complex.h>
#include <math.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
complex double parallel (complex double, complex double);
int main (void)
{
complex double z, zl, zc, zr;
zr=6.9;
zl=I*2*3.14159265358979323846*549000*0.0002; //for 3.14159265358979323846 -> M_PI
zc=1/(I*2*3.14159265358979323846*549000*0,0000000005); //for 3.14159265358979323846 -> M_PI
z=parallel (zl+zr, zc);
printf ("Wirkanteil=%lf Ohm\n", creal (z));
printf ("Blindanteil=%lf Ohm\n\n", cimag(z));
printf ("Betrag=%lf Ohm\n", cabs(z));
printf ("Phi im Bogenmass=%lf Rad\n", carg(z));
}
complex double parallel (complex double a, complex double b)
{
return ((a*b)/(a+b));
}
thanks for helo