#include
using namespace std;
class Rectangle {
public:
Rectangle(int x,int y);
int area();
private:
int width;int length;
};
int Rectangle::area() {
return width*length;
}
int main() {
int width;
int length;
cout<<"enter the width and length of the rectangle:"<
cin>>width>>length;
Rectangle A(width,length);
cout<<"the area of rectangle a is"<<A.area()<<endl;
return 0;
}
Rectangle(int x,int y)構造函數沒實現