- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In this problem, we are given two numbers that give the number of sides of a polygon N and the length of each side A. Our task is to create a **Program to
find the Circumcircle of any regular polygon in C++**.

**Problem description** − Here, we need to find the radius and area of the circumcircle of the regular polygon whose side number and length are given.

**Let’s take an example to understand the problem,**

n = 4 a = 2

To solve the problem, we will first find the radius of the circumcircle of the given polygon.

The formula for the radius of a polygon of side A and N no. of sides is

$r=\square\sqrt{2(1-\square\square\square(360/\square))}$

And using this radius, we will find the area by the formula,

$area =\prod\square^2$

**Program to illustrate the working of our solution,**

#include <bits/stdc++.h> using namespace std; void CalcRadAreaCircumcircle(float n, float a) { float r = a / sqrt( 2 * ( 1 - cos(360 / n))); cout<<"The radius of Circumcircle is "<<r<<endl; cout<<"The area of circumcircle is "<<((3.14)*r*r); } int main() { float n = 5, a = 6; CalcRadAreaCircumcircle(n, a); return 0; }

The radius of Circumcircle is 3.02487 The area of circumcircle is 28.7305

- Related Questions & Answers
- C++ program to find the Area of the circumcircle of any triangles with sides given?
- Program to find the Interior and Exterior Angle of a Regular Polygon in C++
- Area of the circumcircle of any triangles with sides given in C++
- Determine the position of the third person on regular N sided polygon in C++ Program
- Apothem of a n-sided regular polygon in C++
- Area of largest Circle inscribed in N-sided Regular polygon in C Program?
- Area of largest Circle inscribe in N-sided Regular polygon in C Program?
- Area of a n-sided regular polygon with given Radius in C Program?
- Program to find perimeter of a polygon in Python
- Program to find area of a polygon in Python
- Determine the position of the third person on regular N sided polygon in C++?
- Program to calculate area of Circumcircle of an Equilateral Triangle in C++
- Area of Circumcircle of a Right Angled Triangle in C Program?
- Program to count number of isosceles triangle from colored vertex regular polygon in Python
- C++ Program to Find Minimum Value of any Algebraic Expression

Advertisements