Welcome to Westonci.ca, the place where your questions find answers from a community of knowledgeable experts. Get quick and reliable solutions to your questions from a community of experienced professionals on our platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

Write a function named circle that will take two doubles as input parameters. This function should decide whether the point (x, y) lies inside the unit circle (the circle with center at the origin and radius 1), that is, if x² + y² < 1. In case the point is inside the circle, return 1, otherwise return 0.
Note: You need to supply the function codes and its prototype so that it fits into the following codes.

#include


/* prototype here */

int main() {
double x, y;
int unitcircle;
while (1) {
scanf("%lf%lf", &x, &y);
if (x == 0 && y == 0) break;
unitcircle = circle(x, y);
printf("(%5.2f, %5.2f)", x, y);
if (unitcircle == 0)
printf(" is outside the unit circle\n");
else
printf(" is inside the unit circle\n");
}
}

/* definition of the function below */