C Program To Find Area Of Equilateral Triangle - Codingeek
Maybe your like
In this C Programming example, we will implement the program to find the area of an equilateral triangle and print the output on the console.
Table of Contents
- 1. What is an equilateral triangle and how to find its Area?
- 2. C Program to find the area of an equilateral triangle
- 3. Conclusion
- Recommended –
1. What is an equilateral triangle and how to find its Area?
A Triangle with all angles at 60 degrees and congruent sides or an equiangular triangle is described as Equilateral Triangle.
In an equilateral triangle, median, angle bisector, and altitude for all sides are all the same.
The area of an equilateral triangle is √3 a2/ 4.

Helpful topics to understand this program better are-
- Data Types in C
- Console Input / Output in C
- Functions in C
2. C Program to find the area of an equilateral triangle
Let’s discuss the execution(kind of pseudocode) for the program to find the area of an equilateral triangle in C.
- Initially, we prompt the user to enter the side of the equilateral triangle.
- The value is stored in the int side and the value of the area of the triangle is stored in the float area.
- Now, the side length is used for the calculation in the formula area = ( 1.73 * side * side) / 4.
- After the calculations, the value is stored in the float area and use this variable to print the output.
Let us now implement the above execution of the program to find the area of an equilateral triangle in C.
#include <math.h> #include <stdio.h> int main() { int side; float area; printf("\nEnter the side of the triangle: "); scanf("%d", &side); area = (1.73 * side * side) / 4; printf("\nThe Area of an Equilateral Triangle is: %f", area); return (0); }Output Enter the side of the triangle: 6 The Area of an Equilateral Triangle is: 15.5700003. Conclusion
In this C Programming example, we have discussed how to find the area of an equilateral triangle in C.
Helpful Links
Please follow C Programming tutorials or the menu in the sidebar for the complete tutorial series.
Also for the example C programs please refer to C Programming Examples.All examples are hosted on Github.
Recommended Books
An investment in knowledge always pays the best interest. I hope you like the tutorial. Do come back for more because learning paves way for a better understanding
Do not forget to share and Subscribe.
Happy coding!! ?
Recommended -
C program to Find the Area of an Equilateral Triangle was last modified: July 18th, 2021 by Arushi DwivediTags:c programmingTag » Area Of Equilateral Triangle C Program
-
C Program To Find Area Of An Equilateral Triangle - Codeforwin
-
C Program To Find Area Of An Equilateral Triangle - Tutorial Gateway
-
C Program To Calculate Area Of An Equilateral Triangle
-
Program To Find The Area Of An Equilateral Triangle - Javatpoint
-
C Program To Find Area Of An Equilateral Triangle - CodingBroz
-
C Program To Calculate Area Of Equilatral Triangle
-
C Program To Calculate The Area Of An Equilateral Triangle
-
C Program Area Of Equilateral Triangle - Java Tutoring
-
Find Area Of An Equilateral Triangle: C Program
-
C Program To Find Area Of An Equilateral Triangle - Tuts Make
-
C Program To Check Whether The Triangle Is Equilateral, Isosceles Or ...
-
C++ Exercises: Calculate Area Of An Equilateral Triangle - W3resource
-
C Program To Find Area Of Equilateral Triangle - Oodlescoop
-
C Program To Find Area Of Equilateral Triangle