- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 Articles
- Area of the circumcircle of any triangles with sides given in C++
- Program to find the Circumcircle of any regular polygon in C++
- Golang Program to Find the Area of a Triangle Given All Three Sides
- 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 calculate area of Circumcircle of an Equilateral Triangle
- Find the area of the following triangles."
- Find the area of each of the following triangles:"
- Find number of unique triangles among given N triangles in C++
- C program to sort triangles based on area
- Find area of parallelogram if vectors of two adjacent sides are given using C++.
- Area of Circumcircle of a Right Angled Triangle?
- Find area of triangle if two vectors of two adjacent sides are given using C++
- Corresponding sides of two similar triangles are in the ratio of $2 : 3$. If the area of the smaller triangle is $48 cm 2$, then find the area of the larger triangle.
- Corresponding sides of two similar triangles are in the ratio of ( 2: 3 ). If the area of the smaller triangle is ( 48 mathrm{~cm}^{2} ), find the area of the larger triangle.

Advertisements