class mycomplex {
double re, im;
public:
mycomplex(double r, double i) {
re = i;
im = i;
} mycomplex(double r) {
re = r;
im = 0;
}
mycomplex() {
re = im = 0;
}
friend mycomplex operator + (mycomplex, mycomplex);
friend mycomplex operator - (mycomplex, mycomplex);
friend mycomplex operator - (mycomplex);
friend mycomplex operator *(mycomplex, mycomplex);
friend mycomplex operator / (mycomplex, mycomplex);
friend bool operator == (mycomplex, mycomplex);
friend bool operator != (mycomplex, mycomplex);
double real();
double imag();
};