**C program for area of equilateral triangle**

**Formula of area of equilateral triangle:**

Area = (√3)/4 * a

^{2 }**C code:**

#include<stdio.h>

#include<math.h>

int main(){

float a;

float area;

printf("Enter
size of side of the equilateral triangle : ");

scanf("%f",&a);

area
= sqrt(3)/4*(a*a);

printf("Area of equilateral
triangle is: %.3f",area);

return 0;

}

**Sample output:**

Enter size of side of the equilateral triangle: 5

Area of equilateral triangle is: 10.825

7. Write a c program to find the area of rhombus.

8. Write a c program to find the area of parallelogram.

## No comments:

Post a Comment