answersLogoWhite

0


Best Answer

I'm not going to write the program for you, but the way to determine whether a point lies within a circle is very easy: just compare the distance between the point and the centerpoint of the circle with its radius. If the distance is smaller, it's inside the circle, if it's greater, then the point is outside.

You can calculate the distance between the point and the centerpoint using Pythagoras's method. If the point is at (PX, PY) and the centerpoint is at (CX, CY), the distance can be calculated as such:
DX = (CX - PX); // X distance
DY = (CY - PY); // Y distance
distance = sqrt( (DX * DX) + (DY * DY) );

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find whether the given point lies inside or outside or in circle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How long are each side of an octagon 24 inch circle?

The answer depends on whether the octagon is inside the circle or outside (tangential).


Given the coordinates xy of a center of a circle and its radius write a program which will determine whether a point lies inside the circleon the circle or outside the circle conditional statements?

Center is at (Xc, Yc ). Radius = R. ======================================= Print "Input the coordinates of point 'P', separated by a comma." Input A, B D = (Xc - A)2 + (Yc - B)2 If D < R2 then print "'P' is inside the circle." If D = R2 then print "'P' is on the circle." If D > R2 then print "'P' is outside the circle." by arup nandy


Given the coordinates xy of a center of a circle and it's radiuswrite a program which will determine whether a point lies inside the circleon the circle or outside the circle conditional statements?

Center is at (Xc, Yc ). Radius = R. ======================================= Print "Input the coordinates of point 'P', separated by a comma." Input A, B D = (Xc - A)2 + (Yc - B)2 If D < R2 then print "'P' is inside the circle." If D = R2 then print "'P' is on the circle." If D > R2 then print "'P' is outside the circle."


The circumference of a circle and the perimeter of a square can intersect at a maximum of how many points?

Whether the square is inside or outside the circle,they can't have more than 4 common points.


What is the space inside a circle?

Circumference is the outside of the circle and the inside is the are of the circle. And inside of the circle, there is diameter and radius. Radius is from the center point to the edge of the circle and diameter is all the way across.


What is the area of the park if diameter of circular park is 14meter and width is 3.5meter?

The answer depends on whether the width is inside the 14 metre circle or outside.


How do you find out if each point is on inside or outside of the circle?

Find the distance of the point from the centre of the circle. If the distance is - less than that radius then the point is inside the circle, - equal to the radius then the point is on the circle, and - greater than that radius then the point is outside the circle.


How many sides of a circle?

there are two. Inside and outside.


How many side does the circle has?

two, inside and outside


How many sides does the circle have?

there are 2 sides..inside and outside..


How many sides are in a circle?

There are two sides , the inside and the outside !


How many sides does circle have?

2, an inside and an outside.