Given the side of a square then find the area of a Circumscribed circle around it.

Examples:

Input : a = 6 Output : Area of a circumscribed circle is : 56.55 Input : a = 4 Output : Area of a circumscribed circle is : 25.13

All four sides of a square are of equal length and all four angles are 90 degree. The circle is circumscribed on a given square shown by a shaded region in the below diagram.

**Properties of Circumscribed circle are as follows:**

- The center of the circumcircle is the point where the two diagonals of a square meet.
- Circumscribed circle of a square is made through the four vertices of a square.
- The radius of a circumcircle of a square is equal to the radius of a square.

Formula used to calculate the area of inscribed circle is:

(PI * a * a)/2

where, a is the side of a square in which a circle is circumscribed.

How does this formula work?

We know area of circle = PI*r*r.We also know radius of circle = (square diagonal)/2

Length of diagonal = ?(2*a*a)

Radius = ?(2*a*a)/2 = ?((a*a)/2)

Area = PI*r*r = (PI*a*a)/2

## C++

`// C++ Program to find the ` `// area of a circumscribed circle ` `#include <stdio.h> ` `#define PI 3.14159265 ` ` ` `float` `areacircumscribed(` `float` `a) ` `{ ` ` ` `return` `(a * a * (PI / 2)); ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `float` `a = 6; ` ` ` `printf` `(` `" Area of an circumscribed circle is : %.2f "` `, ` ` ` `areacircumscribed(a)); ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java program to calculate ` `// area of a circumscribed circle-square ` `import` `java.io.*; ` `class` `Gfg { ` ` ` `// Utility Function ` ` ` `static` `float` `areacircumscribed(` `float` `a) ` ` ` `{ ` ` ` `float` `PI = ` `3` `.14159265f; ` ` ` `return` `(a * a * (PI / ` `2` `)); ` ` ` `} ` ` ` ` ` `// Driver Function ` ` ` `public` `static` `void` `main(String arg[]) ` ` ` `{ ` ` ` `float` `a = ` `6` `; ` ` ` `System.out.print(` `"Area of an circumscribed"` ` ` `+ ` `"circle is :"` `); ` ` ` `System.out.println(areacircumscribed(a)); ` ` ` `} ` `} ` ` ` `// The code is contributed by Anant Agarwal. ` |

*chevron_right*

*filter_none*

## Python3

`# Python3 Program to find the ` `# area of a circumscribed circle ` `PI ` `=` `3.14159265` ` ` `def` `areacircumscribed(a): ` ` ` ` ` `return` `(a ` `*` `a ` `*` `(PI ` `/` `2` `)) ` ` ` `# Driver code ` `a ` `=` `6` `print` `(` `" Area of an circumscribed circle is :"` `, ` ` ` `round` `(areacircumscribed(a), ` `2` `)) ` ` ` `# This code is contributed by Smitha Dinesh Semwal ` |

*chevron_right*

*filter_none*

## C#

`// C# Program to find the ` `// area of a circumscribed circle ` `using` `System; ` ` ` `class` `GFG { ` ` ` ` ` `public` `static` `double` `PI= 3.14159265 ; ` ` ` ` ` `static` `float` `areacircumscribed(` `float` `a) ` ` ` `{ ` ` ` `return` `(a * a * (` `float` `)(PI / 2)); ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `Main() ` ` ` `{ ` ` ` `float` `a = 6; ` ` ` ` ` `Console.Write(` `" Area of an circumscribed"` ` ` `+ ` `" circle is : {0}"` `, ` ` ` `Math.Round(areacircumscribed(a), 2)); ` ` ` `} ` `} ` ` ` `// This code is contributed by ` `// Smitha Dinesh Semwal ` |

*chevron_right*

*filter_none*

## PHP

`<?php ` `// PHP Program to find the ` `// area of a circumscribed ` `// circle ` ` ` `$PI` `= 3.14159265; ` ` ` `// function returns the area ` `function` `areacircumscribed(` `$a` `) ` `{ ` ` ` `global` `$PI` `; ` ` ` `return` `(` `$a` `* ` `$a` `* (` `$PI` `/ 2)); ` `} ` ` ` ` ` `// Driver code ` ` ` `$a` `= 6; ` ` ` `echo` `" Area of an circumscribed circle is : "` `, ` ` ` `areacircumscribed(` `$a` `); ` ` ` `// The code is contributed by anuj_67. ` `?> ` |

*chevron_right*

*filter_none*

Output :

Area of an circumscribed circle is : 56.55

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.

## Recommended Posts:

- Area of square Circumscribed by Circle
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Area of the circle that has a square and a circle inscribed in it
- Side of a regular n-sided polygon circumscribed in a circle
- Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- Program to calculate area of an Circle inscribed in a Square
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Minimum volume of cone that can be circumscribed about a sphere of radius R
- Equation of circle when three points on the circle are given
- Check if a circle lies inside another circle or not
- 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
- Given equation of a circle as string, find area
- Area of circle inscribed within rhombus
- Area of a circle inscribed in a regular hexagon
- Area of circle which is inscribed in equilateral triangle
- Area of decagon inscribed within the circle
- Find the area of largest circle inscribed in ellipse
- Area of largest Circle inscribe in N-sided Regular polygon

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.