/* struct Rectangle with a constructor*/


#include <iostream>
using namespace std;

// Definition of struct Rectangle begins here.
// Specification part of struct Rectangle
struct Rectangle
{
private:

	float length,width;
public:
	Rectangle(float l, float w);
	float area();								
}; 
// Declaration of struct Rectangle ends here.

int main()
{
	float len, wid;
	cout << "Enter the length followed by the width: ";
	cin >> len >> wid;
	Rectangle rec(len,wid); 
	cout << "The area is: " << rec.area() << endl;
	return 0;
}

// Implementation part of struct Rectangle

// Definition of function Initialize of struct Rectangle
Rectangle::Rectangle(float l, float w)
{
	length = l;
	width = w;
}

// Definition of function Area of struct Rectangle
float Rectangle::area()
{
	return length * width;
}

