#include  using namespace std; class Rect{private:int width;int height;public:void init(int w,int h){width=w;height=h;}int set_w(int w){cin >> w;returnw;}int set_h(int h){cin >> h;returnh;}void show(){cout << "面积" << width * height <<"平方厘米" << endl;}}; int main(){ int width,heigh; cout << "请输入长度和高度(CM)" <> width; cin >> heigh; Rect sin; sin.init(width,heigh); sin.show(); cout << "请输入要修改的长度(CM)" <> width; cout << "请输入要修改的高度(CM)" <> heigh; sin.init(width,heigh); sin.show();return 0;}