C Program To Calculate Area Of An Equilateral Triangle
Maybe your like
- C
- C++
- Java
- Data Structures
- Algorithms
- Design Patterns
- Misc
- C Programs
- C++ Programs
- Java Programs
- Data Structures Programs
- Star Patterns
- College Rankings
- Practice
- Coding Practice
- Problem Of The Day
- Online Compiler
- Contact Us
Here is a C program to find the area and permimeter of an equilateral triangle. An equilateral triangle is a triangle in which all three sides and angles are equal. All three internal angles of equilateral triangle measures 60 degree.
Area of Equilateral Triangle The area of an equilateral triangle is the amount of two-dimensional space inside it. In other words, the area of an equilateral triangle can be calculated by placing the trapezoid over a grid and counting the number of square units it takes to completely cover it. If we know the length of each sides of equilateral triangle, then we can use below mentioned formula to calculate area of equilateral triangle.- Area of Equilateral Triangle = (√ 3 /4)S2
- Area of Equilateral Triangle = (1/2)xSidexAltitude
Perimeter of Equilateral Triangle The perimeter of an equilateral triangle is the linear distance around the boundary of triangle. In other words, it is the length of fence required to enclose an equilateral triangle surface. We can calculate the perimeter of a triangle by adding the length of all sides, as all sides of equilateral triangle are equal, it's perimeter is equal to three times side length. - Perimeter of Equilateral Triangle = 3 X Side
C Program to find the area of an equilateral triangle
#include <stdio.h> #include <math.h> int main(){ float side, area; printf("Enter the length of side of equilateral triangle\n"); scanf("%f", &side); area = sqrt(3)/4 * side * side; printf("Area of triangle : %0.4f\n", area); return 0; } Output Enter the length of side of equilateral triangle 5 Area of triangle : 10.8253To find the area of equilateral triangle we need length of sides of triangle. Above program first takes length of side of triangle as input from user using scanf function and stores it in a floating point variable named 'side'. Then it calculates the area of triangle using above mentioned formula and finally prints the area on screen using printf function.
C Program to find the perimeter of an equilateral triangle
#include <stdio.h> #include <math.h> int main(){ float side, perimeter; printf("Enter the length of side of equilateral triangle\n"); scanf("%f", &side); perimeter = 3 * side; printf("Perimeter of triangle : %0.4f\n", perimeter); return 0; } Output Enter the length of side of equilateral triangle 5.0 Perimeter of triangle : 15.0000To find the perimeter of an equilateral triangle we need length of any side. Above program first takes length of side of triangle as input from user using scanf function and stores it in a floating point variable named 'side'. Then it calculates the perimeter which is three times side length and finally prints the perimeter on screen using printf function.
Properties of Equilateral Triangle- All internal angles of an equilateral triangle are equal. As we know, the sum of internal angles of any triangle must be 180., hence each angle of equilateral triangle measures 60..
- The length of all sides of an equilateral triangle are equal.
- In an equilateral triangle, the radius of the circumcircle is double the radius of the incircle.
- The length of all three medians of equilateral triangle are equal.
- The length of all three altitudes of equilateral triangle are equal.
- The length of all three angle bisectors of equilateral triangle are equal.
- The height of the center of equilateral triangle from each side is h/3.
| C program to calculate area of a right angled triangle |
| C program to calculate area of any triangle |
| C program to calculate area of a rhombus |
| C program to calculate area of a parallelogram |
| C program to calculate area of a trapezium |
| C program to calculate area of a circle |
| C program to calculate volume and total surface area of cone |
| C Program to print fibonacci series |
| List of all C Programs |
Contact Us
Name Email * Message *Popular Posts
- C Graphics Programming Tutorial C Tutorial Graphics in C C Graphics Programming This C Graphics tutoria...
- Java Program to Calculate Grade of Students Here is a Java Program to find the grade of a student, given the marks of N subjects. Given the marks of N subjects, we have to print the g...
- C++ Programming Language Tutorial C++ Tutorials Practice Problems C++ Programming Tutorial C++ is a powerf...
- C Program to Draw a Circle Using C Graphics Here is a C program to draw a circle on screen using graphics.h header file. In this program, we will draw a circle on screen having centr...
- C program to print triangle, pyramid, geometrical shapes and star patterns Pattern printing programs in C are not just about creating visually appealing shapes and designs on the console. They serve a much greater...
- C Program to Check a String is Palindrome Here is the C program to check string is palindrome or not. A string is palindrome, if string remains same after reversing it's charact...
- C Programming Language Tutorial C Tutorials Practice Problems C Programming Tutorial C is a general-pur...
- C Programming Examples Tutorial Examples Graphics C Examples C is a general-purpose programm...
- C Program for Bouncing Ball Animation Using C Graphics Here is a C graphics program for bouncing ball animation using graphics.h header file. In this program, we will draw a red color ball move ...
- C Program to Draw a Rectangle and Bar Using C Graphics Here is a C program to draw a rectangle and a bar on screen using graphics.h header file. In this program, we will draw a rectangle and a b...
Search This Blog
Tag » 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
-
Program To Find The Area Of An Equilateral Triangle - Javatpoint
-
C Program To Find Area Of An Equilateral Triangle - CodingBroz
-
C Program To Find Area Of Equilateral Triangle - Codingeek
-
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