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
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.
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- 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
- 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
- Program to find area of a circle
- Find the area of largest circle inscribed in ellipse
- Check if a circle lies inside another circle or not
- Area of a Circumscribed Circle of a Square
- Area of square Circumscribed by Circle
- Program to calculate area of an Circle inscribed in a Square
- Area of circle inscribed within rhombus
- Area of a circle inscribed in a regular hexagon
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Area of circle which is inscribed in equilateral triangle
- Area of decagon inscribed within the circle
- Area of largest Circle inscribe in N-sided Regular polygon
- Area of largest Circle that can be inscribed in a SemiCircle
- Area of Equilateral triangle inscribed in a Circle of radius R
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.