Here we have a rectangle of length l & breadth b.We have to find the circumradius of the rectangle.
Input : l = 3, b = 4 Output :2.5 Input :l = 10, b = 12 Output :3.95227774224
From the diagram, we can clearly understand the circumradius r is half of the diagonal of the rectangle.
r = √(l^2 + b^2)/2
Below is the implementation of the above approach:
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.
- Distance between Incenter and Circumcenter of a triangle using Inradius and Circumradius
- Circumradius of a Cyclic Quadrilateral using the length of Sides
- Largest subset of rectangles such that no rectangle fit in any other rectangle
- Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW
- Find the largest rectangle of 1's with swapping of columns allowed
- Check if four segments form a rectangle
- Find Corners of Rectangle using mid points
- Check whether a given point lies inside a rectangle or not
- Program to print a rectangle pattern
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Program for Area And Perimeter Of Rectangle
- Finding the best fit rectangle that covers a given point
- Program to print hollow rectangle or square star patterns
- Program to find Perimeter / Circumference of Square and Rectangle
- Area of the biggest possible rhombus that can be inscribed in a rectangle
- Check if given four integers (or sides) make rectangle
- Draw Rectangle in C graphics
- Coordinates of rectangle with given points lie inside
- Find minimum area of rectangle with given set of coordinates
- Number of squares of maximum area in a rectangle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.