Given an equation of the circle X2 + Y2 = R2 whose center at origin (0, 0) and the radius is R. The task is to find area of circle.
Input : X*X + Y*Y = 25 Output : The area of circle centered at origin is : 78.55 Input : X*X + Y*Y = 64 Output : The area of circle centered at origin is : 201.088
- Given an equation X2 + Y2 = R2 and store it into string ‘str’.
- Count length of string and store it into ‘len’.
- Start loop from 0 to len – 1 and check if str[i] == ‘=’.
- Store characters after ‘=’ into string variable st.
- Convert string ‘st’ into digits and store it into ‘radius_square’.
- Use formula Pi * R2 to find area of circle(multiply by Pi).
The area of circle centered at origin is : 314.2
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Program to find area of a circle
- Find the area of largest circle inscribed in ellipse
- Equation of circle when three points on the circle are given
- 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
- Equation of circle from centre and radius
- Area of decagon inscribed within the circle
- Area of square Circumscribed by Circle
- Area of a Circumscribed Circle of a Square
- Area of circle inscribed within rhombus
- Area of a circle inscribed in a regular hexagon
- Area of largest Circle that can be inscribed in a SemiCircle
- Area of circle which is inscribed in equilateral triangle
- Area of circle inscribed in a Isosceles Trapezoid
- Program to calculate area of an Circle inscribed in a Square
- Area of Equilateral triangle inscribed in a Circle of radius R
- Area of largest Circle inscribe in N-sided Regular polygon
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Program to find number of solutions in Quadratic Equation
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.