- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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
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
#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
Advertisements