# Area of Circumcircle of a Right Angled Triangle in C Program?

CServer Side ProgrammingProgramming

#### C in Depth: The Complete C Programming Guide for Beginners

45 Lectures 4.5 hours

#### Practical C++: Learn C++ Basics Step by Step

Most Popular

50 Lectures 4.5 hours

#### Master C and Embedded C Programming- Learn as you go

66 Lectures 5.5 hours

Here we will see how to get the area of circumcircle of a right angled triangle. The hypotenuse of the triangle is forming the diameter of the circle. So if the hypotenuse is h, then radius is h/2

So the area is −

## Example Code

#include <iostream>
#include <cmath>
using namespace std;
float area(float h) {
if (h < 0) //if h is negative it is invalid
return -1;
float area = 3.1415 * (h/2) * (h/2);
return area;
}
int main() {
float h = 8;
cout << "Area : " << area(h);
}

## Output

Area : 50.264
Updated on 20-Aug-2019 12:14:41