Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- float r1,x1,y1,r2,x2,y2,d,dif;
- cin>>r1>>x1>>y1>>r2>>x2>>y2;
- d=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
- dif=abs(r1-r2);
- if(r1==r2&&x1==x2&&y1==y2)
- cout<<"infinit";
- else
- if(d>r1+r2||d<dif)
- cout<<0;
- else
- if(d==r1+r2||d==dif)
- cout<<1;
- else
- cout<<2;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement