Given two equal length chords of a circle and Distance between the centre and one chord. The task is here to find the distance between the centre and the other chord.

**Examples:**

Input:48Output:48Input:82Output:82

Below is the implementation of the above approach:

**Approach**:

Let **AB** & **CD** be the two equal chords of the circle having center at **O**.**OM** be the given distance of the chord **AB** from center.

now in triangle **AOM** and **CON**,

**OA** = **OC** (radii of same circle)

**MA** = **CN** (since OM and ON are the perpendicular to the chord and it bisects the chord and AM = MB & CN = CD)

angle **AMO** = angle **ONC** = 90 degrees

so the triangles are congruent

so, **OM = ON**

Equal chords of a circle are equidistant from the centre of a circle.

Below is the implementation of the above approach:

## C++

`// C++ program to find the distance of chord ` `// from center when distance between center ` `// and another equal length chord is given ` ` ` `#include <bits/stdc++.h> ` `using` `namespace` `std; ` ` ` `void` `lengequichord(` `int` `z) ` `{ ` ` ` `cout << ` `"The distance between the "` ` ` `<< ` `"chord and the center is "` ` ` `<< z << endl; ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `int` `z = 48; ` ` ` `lengequichord(z); ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java program to find the distance of chord ` `// from center when distance between center ` `// and another equal length chord is given/ ` ` ` `import` `java.io.*; ` ` ` `class` `GFG ` `{ ` ` ` `static` `void` `lengequichord(` `int` `z) ` `{ ` ` ` `System.out.println (` `"The distance between the "` `+ ` ` ` `"chord and the center is "` `+ z ); ` `} ` ` ` `// Driver code ` `public` `static` `void` `main (String[] args) ` `{ ` ` ` ` ` `int` `z = ` `48` `; ` ` ` `lengequichord(z); ` `} ` `} ` ` ` `// This code is contributed by jit_t. ` |

*chevron_right*

*filter_none*

## Python 3

`# Python 3 program to find the distance of chord ` `# from center when distance between center ` `# and another equal length chord is given ` ` ` `def` `lengequichord(z): ` ` ` `print` `(` `"The distance between the"` `, ` ` ` `"chord and the center is"` `, z ) ` ` ` `# Driver code ` `if` `__name__ ` `=` `=` `"__main__"` `: ` ` ` `z ` `=` `48` ` ` `lengequichord(z) ` ` ` `# This code is contributed ` `# by ChitraNayal ` |

*chevron_right*

*filter_none*

## C#

`// C# program to find the distance of chord ` `// from center when distance between center ` `// and another equal length chord is given ` `using` `System; ` ` ` `class` `GFG ` `{ ` ` ` ` ` `static` `void` `lengequichord(` `int` `z) ` ` ` `{ ` ` ` `Console.WriteLine(` `"The distance between the "` `+ ` ` ` `"chord and the center is "` `+ z ); ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `Main () ` ` ` `{ ` ` ` ` ` `int` `z = 48; ` ` ` `lengequichord(z); ` ` ` `} ` `} ` ` ` `// This code is contributed by AnkitRai01 ` |

*chevron_right*

*filter_none*

**Output:**

The distance between the chord and the center is 48

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Angle subtended by the chord to center of the circle when the angle subtended by the another equal chord of a congruent circle is given
- Length of the chord the circle if length of the another chord which is equally inclined through the diameter is given
- Length of the chord of the circle whose radius and the angle subtended at the center by the chord is given
- Angle subtended by the chord when the angle subtended by another chord of same length is given
- Program to calculate angle on circumference subtended by the chord when the central angle subtended by the chord is given
- Distance between centers of two intersecting circles if the radii and common chord length is given
- Shortest distance from the centre of a circle to a chord
- Angle between a chord and a tangent when angle in the alternate segment is given
- Count paths with distance equal to Manhattan distance
- Find the Diameter or Longest chord of a Circle
- Count ways to divide circle using N non-intersecting chord | Set-2
- Length of race track based on the final distance between participants
- Time until distance gets equal to X between two objects moving in opposite direction
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- Convert a given temperature to another system based on given boiling and freezing points
- Minimum revolutions to move center of a circle to a target
- Find the center of the circle using endpoints of diameter
- Check whether two convex regular polygon have same center or not
- Number of cycles formed by joining vertices of n sided polygon at the center
- Puzzle | Connect 9 circles each arranged at center of a Matrix using 3 straight lines

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.