C program to find an area of an equilateral triangle.

 

01  #include<stdio.h>
02 #include<math.h>
03
04 int main()
05 {
06
07 int side;
08 float area;
09
10 printf("nEnter the Length of Side : ");
11 scanf("%d", &side);
12
13 area = (float)(sqrt(3)*(side * side))/4;
14
15 printf("nArea of Equilateral Triangle : %.2f", area);
16 return 0;
17 }
 
 
OUTPUT :

Enter the Length of Side : 5
Area of Equilateral Triangle : 10.83

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.