Write a C program to input side of an equilateral triangle from user and find area of the given equilateral triangle.
Code:
#include<stdio.h>
#include<math.h>
int main() {
int side;
float area, r;
r = sqrt(3) / 4;
printf("\nPlease enter the Length of Side : ");
scanf("%d", &side);
area = r * side * side;
printf("\nArea of Equilateral Triangle : %f", area);
return (0);
}