Radius of the circle when the width and height of an arc is given Last Updated : 07 Jun, 2022 Comments Improve Suggest changes Like Article Like Report Given a circle in which the width and height of an arc are given. The task is to find the radius of the circle with the help of the width and height of the arc.Examples: Input: d = 4, h = 1 Output: The radius of the circle is 2.5 Input: d = 14, h = 8 Output: The radius of the circle is 7.0625 Approach Let the radius of the circle be rLet the height and width of the arc be h & dNow, the diameter DC bisects the chord AB in two halves, each having length d/2Also the diameter is divided by the chord in two parts, the part inside arc h and the remaining 2r-hNow from intersecting chords theorem, h*(2r-h) = (d/2)^2 or, 2rh - h^2 = d^2/4 so, r = d^2/8h + h/2So, radius of the circle r = d^2/8h + h/2 C++ // C++ program to find // radius of the circle // when the width and height // of an arc is given #include <bits/stdc++.h> using namespace std; // Function to find the radius void rad(double d, double h) { cout << "The radius of the circle is " << ((d * d) / (8 * h) + h / 2) << endl; } // Driver code int main() { double d = 4, h = 1; rad(d, h); return 0; } Java // Java program to find // radius of the circle // when the width and height // of an arc is given class GFG { // Function to find the radius static void rad(double d, double h) { System.out.println( "The radius of the circle is " + ((d * d) / (8 * h) + h / 2)); } // Driver code public static void main(String[] args) { double d = 4, h = 1; rad(d, h); } } /* This code contributed by PrinciRaj1992 */ Python3 # Python3 program to find # radius of the circle # when the width and height # of an arc is given # Function to find the radius def rad(d, h): print("The radius of the circle is", ((d * d) / (8 * h) + h / 2)) # Driver code d = 4; h = 1; rad(d, h); # This code is contributed by 29AjayKumar C# // C# program to find // radius of the circle // when the width and height // of an arc is given using System; class GFG { // Function to find the radius static void rad(double d, double h) { Console.WriteLine( "The radius of the circle is " + ((d * d) / (8 * h) + h / 2)); } // Driver code public static void Main() { double d = 4, h = 1; rad(d, h); } } // This code is contributed by AnkitRai01 PHP <?php // PHP program to find radius of // the circle when the width and // height of an arc is given // Function to find the radius function rad($d, $h) { echo "The radius of the circle is ", (($d * $d) / (8 * $h) + $h / 2), "\n"; } // Driver code $d = 4; $h = 1; rad($d, $h); // This code is contributed by ajit ?> JavaScript <script> // Javascript program to find // radius of the circle // when the width and height // of an arc is given // Function to find the radius function rad(d, h) { document.write("The radius of the circle is " +((d * d) / (8 * h) + h / 2)); } // Driver code var d = 4, h = 1; rad(d, h); </script> Output: The radius of the circle is 2.5 Time Complexity: O(1) Auxiliary Space: O(1) Comment More infoAdvertise with us Next Article Radius of the circle when the width and height of an arc is given I IshwarGupta Follow Improve Article Tags : Mathematical Geometric DSA Practice Tags : GeometricMathematical Similar Reads Find area of the Circle when the area of inscribed Square is given Given the area of a square inscribed in a circle as N, the task is to calculate the area of a circle in which the square is inscribed. Examples: Input: N = 4 Output: 6.283 Input: N = 10Output: 15.707 Approach: Consider the below image: Let the area of the square is 'A'The side of the square is given 4 min read Radius of a circle having area equal to the sum of area of the circles having given radii Given two integers r1 and r2, representing the radius of two circles, the task is to find the radius of the circle having area equal to the sum of the area of the two circles having given radii. Examples: Input:r1 = 8r2 = 6Output:10Explanation:Area of circle with radius 8 = 201.061929 Area of a circ 4 min read Calculate area and height of an isosceles triangle whose sides are radii of a circle Given integers R and \alpha representing the radius of a circle and the angle formed at the center O by the sector AB (as shown in the figure below), the task is to find the height and area of the triangle formed by connecting the points A, B, and O if possible. Otherwise, print "Not possible". Exam 6 min read Length of the chord of the circle whose radius and the angle subtended at the center by the chord is given Given a circle whose radius and the angle subtended at the centre by its chord is given. The task is to find the length of the chord.Examples: Input: r = 4, x = 63 Output: 4.17809 Input:: r = 9, x = 71 Output:: 10.448 Approach: Let the circle has center at O and has radius r, and it's chord be AB.le 4 min read Radii of the three tangent circles of equal radius which are inscribed within a circle of given radius Given here is a circle of a given radius. Inside it, three tangent circles of equal radius are inscribed. The task is to find the radii of these tangent circles. Examples: Input: R = 4Output: 1.858 Input: R = 11Output: 5.1095 Approach: Let the radii of the tangent circles be r, and the radius of the 3 min read Like