#includeusing namespace std;class complex{public: complex(float a,float b); complex(float a); void add(complex &c); void show();private: float x,y;};complex::complex(float a,float b){ x=a; y=b;}complex::complex(float a){ x=a;}void complex::add(complex&c){x+=c.x;y+=c.y;}void complex::show(){ cout< <<"+"< <<"i"<
#includeusing namespace std;class complex{public: complex(float a,float b); complex(float a); void add(complex &c); void show();private: float x,y;};complex::complex(float a,float b){ x=a; y=b;}complex::complex(float a){ x=a;}void complex::add(complex&c){x+=c.x;y+=c.y;}void complex::show(){ cout< <<"+"< <<"i"<
c1.show(); return 0;}