Hi, I have a problem with structures in c.
In my book is written that I load a structure of complex number like this:
typedef struct{double re,im;}compl;
compl load(compl c){
scanf("%1f%1f",&c.re,&c.im);
return c;}.
But, it does not load in complex number i told him to load. Like this:
void pisi(kompl a){
printf("\n%.3f%cj%.3f",a.re, (a.im?'-':'+'),fabs(a.im));}.
Which function is wrong?
And, can I define series of complex numbers like : compl series[100];?
Sorry for my English!