第1个回答 2012-06-17
#define MATH_PI 3.1415926
class Circle
{
public:
Circle():cx(0), cy(0),r(0){};
Circle(double x_in, double y_in, double r_in):cx(x_in), cy(y_in),r(r_in){};
public:
double centerX()const {return cx;};
double centerY()const {return cy;};
double setCenterX(double x_in){cx = x_in;};
double setCenterY(double x_in){cy = y_in;};
double getPerimeter()const{return 2*MATH_PI*r;};
private:
double cx;
double cy;
double r;
}本回答被提问者采纳