#include<iostream.h>
#include<math.h>
class complex{
private:
double real;
double imag;
public:
//void init (double r,double i)
//{real=r; imag=i;}
complex(double r=0,double i=0)
{
real=r;
imag=i;
}
double realcomplex() {return real;}
double imagcomplex(){return imag;}
double abscomplex()
{
double t;
t=real*real+imag*imag;
return sqrt(t);
}
};
void main()
{
//complex a ;
//a.init(1.1,2.2);
complex a(1.1,2.2);
cout<<"real of complex a="<<a.realcomplex()<<endl;
cout<<"image of complex a="<<a.imagcomplex()<<endl;
cout<<"abs of complex a="<<a.abscomplex()<<endl;
complex b;
cout<<"real of complex b="<<b.realcomplex()<<endl;
cout<<"image of complex b="<<b.imagcomplex()<<endl;
cout<<"abs of complex b="<<b.abscomplex()<<endl;
}