#include
using namespace std;
class Rectangle
{
public:
void input();
void output();
private:
double length;
double width;
double x1,x2,y1,y2;
};
void Rectangle::input()
{
cout<<"请输入矩形的左下角与右上角的合法坐标:"<
cin>>x2>>y2;
}
void Rectangle::output()
{
cout<<"该矩形的周长:"<<2*(abs(x2-x1)+abs(y1-y2))<
}
void main()
{ Rectangle r;
r.input();
r.output();}