
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 the Area and Perimeter of Incircle of an Equilateral Triangle What is Equilateral Triangle in C?
What is Equilateral Triangle?
As the name suggests, equilateral triangle is the one that have equal sides and also it have equal interior angles of 60° each. It is also known as regular triangle because it’s a regular polygon
Properties of equilateral triangle are −
- 3 sides of equal length
- Interior angles of same degree which is 60
Incircle
Incircle is the circle that lies inside the triangle which means the center of circle is same as of triangle as shown in the figure below. The center of incircle is known as incenter and radius is known as inradius.
Given below is the figure of Incircle of an Equilateral Triangle
Problem
Given with the side of an equilateral triangle the task is to find the area and perimeter of an incircle inside it where area is the space occupied by the shape and volume is the space that a shape can contain.
To calculate area and perimeter of an incircle inside equilateral triangle there is a formula −
Example
Input-: side=6.0 Output-: Area of inscribed circle is :1.046667 Perimeter of inscribed circle is :3.625760
Algorithm
Start Step 1 -> define macro as #define pi 3.14 Step 2 -> Declare function to find area of inscribed circle float area(float a) return (a * a * (pi / 12)) step 3 -> Declare function to find Perimeter of inscribed circle float perimeter(float a) return (pi * (a / sqrt(3))) step 4 -> In main() Declare variable as float a = 6.0 Call area(a) Call perimeter(a) Stop
Example
#include <math.h> #include <stdio.h> #define pi 3.14 // function to find area of inscribed circle float area(float a){ return (a * a * (pi / 12)); } // function to find Perimeter of inscribed circle float perimeter(float a){ return (pi * (a / sqrt(3))); } int main(){ float a = 6.0; printf("Area of inscribed circle is :%f\n",area(a)); printf("Perimeter of inscribed circle is :%f",perimeter(a)); return 0; }
Output
Area of inscribed circle is :1.046667 Perimeter of inscribed circle is :3.625760
- Related Questions & Answers
- Program to calculate area and perimeter of equilateral triangle
- Program to calculate area and perimeter of equilateral triangle in C++
- Program to calculate area of Circumcircle of an Equilateral Triangle
- Program to calculate area of Circumcircle of an Equilateral Triangle in C++
- Area of circle which is inscribed in an equilateral triangle?
- Area of circle which is inscribed in equilateral triangle in C Program?
- Count of distinct rectangles inscribed in an equilateral triangle in C++
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of Incircle of a Right Angled Triangle in C Program?
- C Program to check whether the triangle is equilateral, isosceles or scalene
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle?
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle in C?
- Biggest Square that can be inscribed within an Equilateral triangle?
- Biggest Square that can be inscribed within an Equilateral triangle in C?