#include #include // use #gcc -lm to compile while using math.h int main() { float x1=0,y1=0,r1=0,x2=0,y2=0,r2=0; printf("Enter the coordinates and radius of circle 1 in format: x1,y1,r1 "); scanf("%f,%f,%f",&x1,&y1,&r1); printf("Enter the coordinates and radius of circle 2 in format: x2,y2,r2 "); scanf("%f,%f,%f",&x2,&y2,&r2); double squareDistance = ((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); double distanceCenter = sqrt(squareDistance); if(distanceCenter <= r1+r2) { printf("Circles intersect\n"); } else { printf("Circles do not intersect\n"); } return 0; }