Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int x1, y1, r1, x2, y2, r2;
- cout << "Input integer XCoord,YCoord and radius of the first circle:";
- cin >> x1>>y1>>r1;
- cout << "Input integer XCoord,YCoord and radius of the second circle:";
- cin >> x2 >> y2 >> r2;
- int exp = (x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2);
- if (exp < (r1 + r2)*(r1 + r2))
- {
- cout << "The circles intersect at more than one point.";
- }
- else if (exp == (r1 + r2)*(r1 + r2))
- {
- cout << "The circles intersect at one point.";
- }
- else
- {
- cout << "The circles do not intersect.";
- }
- while (true) {};
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement