Alright, I've been working on complex numbers, and I have the structure for it...
Now, if I wanted to make a matrix with cmplx numbers, could I just...Code:struct cmplx { double r; double i; };
I'm guessing this is how to do it, but I don't think it will print as number+number*i.Code:int main(){ cmplx a,b,c,d, A[2][2]; a.r=0 a.i=0 b.r=0 b.i=0 c.r=0 c.i=0 d.r=0 d.i=0 A[0][0]=a; A[0][1]=b; A[1][0]=c; A[1][1]=d;
Any ideas to do this? Any ideas to get a simple format for printing out complex numbers?



LinkBack URL
About LinkBacks


