You are viewing a single comment's thread. Return to all comments →
// very simple solution passes all the test cases. class Rectangle{
public: int width,height; void display(){ cout << width << " " << height;
} }; class RectangleArea : public Rectangle{ public: void read_input(){ cin >> width >> height; } void display(){ cout << "\n" << (width*height); }
};
Rectangle Area
You are viewing a single comment's thread. Return to all comments →
// very simple solution passes all the test cases. class Rectangle{
public: int width,height; void display(){ cout << width << " " << height;
} }; class RectangleArea : public Rectangle{ public: void read_input(){ cin >> width >> height; } void display(){ cout << "\n" << (width*height); }
};