#include using namespace std;class rectangle {public: double area(double l,double w);private:double length,width;};double rectangle::area(double l,double w){length=l;width=w;return length*width;}int main(){rectangle Rectangle; double length,width;cin>>length>>width;cout< <
#include using namespace std;class Complex{ public: Complex(double r0,double i0){ real=r0; imaginary=i0; }; Complex(Complex &c0); void add(Complex &C0) void show(); private: double real,imaginary; };void Complex::add(Complex &c0){ real+=c0.real,imaginary+=c0.imaginary; }void Complex::show(){ cout< < <<'i'<