Program to calculate area of Circumcircle of an Equilateral Triangle


A circumcircle is a circle that inscribes a regular polygon inside it. The triangle that is inscribed inside a circle is an equilateral triangle. Area of circumcircle of can be found using the following formula,

Area of circumcircle = “(a * a * (丌 / 3))

Code Logic, The area of circumcircle of an equilateral triangle is found using the mathematical formula (a*a*(丌/3)). The value of 丌 in this code is coded as 3.14. The expression is evaluated into a float value.

Example

 Live Demo

#include <stdio.h>
#include <math.h>
int main(){
   int a = 5;
   float area;
   float pie = 3.14;
   printf("Program to calculate area of Circumcircle of an Equilateral Triangle
");    printf("The side of the triangle is %d
", a);    area = ((pie/3)*a*a);    printf("The area of of Circumcircle of an Equilateral Triangle is %f
", area);    return 0; }

Output

Program to calculate area of Circumcircle of an Equilateral Triangle
The side of the triangle is 5
The area of circle inscribed inside a square is 19.625000

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 30-Jul-2019

165 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements