Given two integers r and d where r is the radius of the smaller circle and d is the difference of the area of this circle with some larger radius circle. The task is to find the area of the larger circle.
Input: r = 4, d = 5
Area of the smaller circle = 3.14 * 4 * 4 = 50.24
55.24 – 50.24 = 5
Input: r = 12, d = 3
Approach: Let radius of the smaller and the larger circles be r and R respectively and the difference in the areas is given to be d i.e. PI * R2 – PI * r2 = d where PI = 3.14
Or, R2 = (d / PI) + r2.
Now, area of the bigger circle can be calculated as PI * R2.
Below is the implementation of the above approach:
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Area of Equilateral triangle inscribed in a Circle of radius R
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- Area of the circle that has a square and a circle inscribed in it
- Program to find area of a circle
- Given equation of a circle as string, find area
- Find the area of largest circle inscribed in ellipse
- Area of decagon inscribed within the circle
- Area of circle inscribed within rhombus
- Area of a Circumscribed Circle of a Square
- Area of square Circumscribed by Circle
- Area of circle which is inscribed in equilateral triangle
- Area of a circle inscribed in a regular hexagon
- Area of circle inscribed in a Isosceles Trapezoid
- Area of largest Circle that can be inscribed in a SemiCircle
- Program to calculate area of an Circle inscribed in a Square
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.