#include <iostream>
using namespace std;
class Point {
public:
void setX(int X) {
x = X;
}
int getX() {
return x;
}
void setY(int Y) {
y = Y;
}
int getY() {
return y;
}
private:
int x; int y;
};
class circle {
public:
void setR(int R) {
r = R;
}
int getR() {
return r;
}
void setcenter(Point center) {
c = center;
}
Point getcenter() {
return c;
}
private:
int r; Point c;
};
void js(Point c1,Point c2,circle c3) {
int d = (c1.getX() - c2.getX()) * (c1.getX() - c2.getX()) + (c1.getY() - c2.getY()) * (c1.getY() - c2.getY());
int rr = c3.getR() * c3.getR();
if (d == rr) { cout << "点在圆上" << endl; }
else if (d < rr) { cout << "点在圆内" << endl; }
else if (d > rr) { cout << "点在圆外" << endl; }
}
int main() {
Point point;
Point center;
circle circle;
point.setX(5); point.setY(5);
center.setX(5); center.setY(0);
circle.setcenter(center); circle.setR(5);
js(point, center, circle);
return 0;
system("pause");
}