Question: int main ( ) { float length, width, radius, side; std::cout < < Enter the length and width of the rectangle: ; std::cin >

int main(){
float length, width, radius, side;
std::cout << "Enter the length and width of the rectangle: ";
std::cin >> length >> width;
Rectangle rectangle(length, width);
std::cout << "Rectangle Area: "<< rectangle.calculateArea()<<", Perimeter: "<< rectangle.calculatePerimeter()<< std::endl;
std::cout << "Enter the radius of the circle: ";
std::cin >> radius;
Circle circle(radius);
std::cout << "Circle Area: "<< circle.calculateArea()<<", Perimeter: "<< circle.calculatePerimeter()<< std::endl;
std::cout << "Enter the side length of the square: ";
std::cin >> side;
Square square(side);
std::cout << "Square Area: "<< square.calculateArea()<<", Perimeter: "<< square.calculatePerimeter()<< std::endl;
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!