- 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
Area of the circumcircle of any triangles with sides given in C++
Here we will see how to get the area of the circumcircle of any triangle whose sides are given. Here the side AB is a, BC is b and CA is c, the radius is ‘r’.
The radius r is same as −
Example
#include <iostream> #include <cmath> using namespace std; float area(float a, float b, float c) { if (a < 0 || b < 0 || c < 0) //if values are is negative it is invalid return -1; float s = (a + b + c) /2; float triangle = sqrt(s * (s - a) * (s - b) * (s - c)); float area = 3.14159 * pow(((a*b*c) / triangle), 2); return area; } int main() { float a = 4, b = 5, c = 3; cout << "Area : " << area(a, b, c); }
Output
Area : 314.159
- Related Articles
- C++ program to find the Area of the circumcircle of any triangles with sides given?
- Program to find the Circumcircle of any regular polygon in C++
- Area of Circumcircle of a Right Angled Triangle in C Program?
- Program to calculate area of Circumcircle of an Equilateral Triangle in C++
- Area of Circumcircle of a Right Angled Triangle?
- Find number of unique triangles among given N triangles in C++
- Program to calculate area of Circumcircle of an Equilateral Triangle
- Maximize volume of cuboid with given sum of sides in C++
- Count number of right triangles possible with a given perimeter in C++
- Find the area of the following triangles."
- The sides of certain triangles are given below. Determine which of them are right triangles. (i) $a = 7 cm, b = 24 cm$ and $c = 25 cm$
- The sides of certain triangles are given below. Determine which of them are right triangles.(ii) $a = 9 cm, b = 16 cm$ and $c = 18 cm$
- The sides of certain triangles are given below. Determine which of them are right triangles.(iii) $a = 1.6 cm, b = 3.8 cm$ and $c = 4 cm$
- The sides of certain triangles are given below. Determine which of them are right triangles.(iv) $a = 8 cm, b = 10 cm$ and $c = 6 cm$
- Find area of parallelogram if vectors of two adjacent sides are given using C++.

Advertisements