Zadatak br.R30

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
double x1,y1,r1,x2,y2,r2,d,s;
cin>>x1>>y1>>r1;
cin>>x2>>y2>>r2;

d=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
s=r1+r2;

if (d>s) cout<<„Krugovi se ne preklapaju“<<endl;
else if (d<s) cout<<„Krugovi se preklapaju“<<endl;
else cout<<„Krugovi se dodiruju“<<endl;
return 0;
}

Advertisements