Rectangle Area

  • + 0 comments
    class Rectangle{
        public:
        int height,width;
        void display(){
            cout<<width<<" "<<height<<endl;
        }
    };
    class RectangleArea: public Rectangle{
        public:
        void read_input(){
            cin>>width>>height;
        }
        void display(){
            cout<<(width*height);
        }
    };