

- 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
C++ program to find the Area of the circumcircle of any triangles with sides given?
To calculate the area of circumcircle of any triangles. We need to learn about basic concepts related to the problem.
Triangle − A closed figure with three sides.
Circle − A closed figure with infinite number or side or no sides.
A circle that encloses other figure inside it is a circumcircle.
A circumcircle touches the triangle from all its points. Lets say its sides are a, b, c then the radius of the circumcircle is given by the mathematical formula −
r = abc / (√((a+b+c))(a+b-c)(a+c-b)(b+c-a)))
The area of the circle with radius r is
area = 2 * (pie) * r *r.
Let’s take a few examples for this concept −
Sides of triangle : a = 4 , b = 5 , c =3
Area = 314
Example
#include <iostream> #include <math.h> using namespace std; int main() { float a = 7, b = 9, c = 13; if (a < 0 || b < 0 || c < 0) cout<<"The figure is not a triangle"; float p = (a + b + c) / 2; float r = (a*b*c)/ (sqrt(p * (p - a) * (p - b) * (p - c))); float area = 3.14 * pow(r, 2); cout<<"The area is "<<area; return 0; }
Output
The area is 2347.55
- Related Questions & Answers
- Area of the circumcircle of any triangles with sides given in C++
- Golang Program to Find the Area of a Triangle Given All Three Sides
- Program to find the Circumcircle of any regular polygon in C++
- Program to calculate area of Circumcircle of an Equilateral Triangle
- Find area of parallelogram if vectors of two adjacent sides are given using C++.
- Program to calculate area of Circumcircle of an Equilateral Triangle in C++
- Find number of unique triangles among given N triangles in C++
- Area of Circumcircle of a Right Angled Triangle?
- Area of Circumcircle of a Right Angled Triangle in C Program?
- Find area of triangle if two vectors of two adjacent sides are given using C++
- C program to sort triangles based on area
- Find the hypotenuse of a right angled triangle with given two sides in C++
- Java program to find the area of a rectangle
- Java program to find the area of a triangle
- Java program to find the area of a circle
Advertisements