#include #include int main () { float a, b, c; /* Constants of the defining equation */ float x0, y0, r; /* Center and radius */ float x, y; /* Coordinates of a given point */ float t; /* Temporary variable */ printf("Enter the coefficients of the defining equation :\n"); printf("a = "); scanf("%f",&a); printf("b = "); scanf("%f",&b); printf("c = "); scanf("%f",&c); t = (a*a+b*b)/4-c; if (t < 0) { printf("These a,b,c do not define a circle.\n"); } else { x0 = -a/2; y0 = -b/2; r = sqrt(t); printf("The circle has center at (%f,%f) and radius %f.\n", x0, y0, r); printf("Enter the coordinates of a point :\n"); printf("x = "); scanf("%f",&x); printf("y = "); scanf("%f",&y); t = sqrt((x-x0)*(x-x0)+(y-y0)*(y-y0)); if (t == r) printf("The point lies on the circle.\n"); else if (t < r) printf("The point lies inside the circle.\n"); else printf("The point lies outside the circle.\n"); } }