We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main()
{
/*
* Declare a RectangleArea object
*/
RectangleArea r_area;
/*
* Read the width and height
*/
r_area.read_input();
/*
* Print the width and height
*/
r_area.Rectangle::display();
/*
* Print the area
*/
r_area.display();
return 0;
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Rectangle Area
You are viewing a single comment's thread. Return to all comments →
using namespace std; class Rectangle{
}; class RectangleArea:public Rectangle { public: void read_input(){ cin>>width>>height; } void display(){ cout<
int main() { /* * Declare a RectangleArea object */ RectangleArea r_area;
}