typedef struct complex { double r, i; } Complex; extern "C" Complex Add(Complex z, Complex w); extern "C" Complex Sub(Complex z, Complex w); extern "C" Complex Mul(Complex z, Complex w); extern "C" Complex Div(Complex z, Complex w); extern "C" Complex Adds(double a, Complex z); extern "C" Complex Muls(double a, Complex z); extern "C" Complex Divs(double a, Complex z); extern "C" Complex Double2Complex(double re, double im); extern "C" Complex Exp(Complex z); extern "C" double Cabs(Complex z, Complex w); extern "C" void PrintC(Complex z); extern "C" void OpenWindow(int width, int height); extern "C" void CloseWindow(); extern "C" void FlushWindow(); extern "C" void DrawLine(int y, int line[]); extern "C" void DrawPoint(int x, int y, int color); extern "C" void DrawCircle(int x, int y, int radius, int color); extern "C" void WaitForButton(int *x, int *y, int *button); extern "C" void DrawRectangle(int x, int y, int width, int height); extern "C" void FillRectangle(int x, int y, int width, int height); extern "C" void SetColor(int); extern "C" void FillArc(int x, int y, int width, int height, int angle1, int angle2);