C Program to Calculate Area of Equilatral Triangle
Posted by Samath
Last Updated: January 01, 2017

Write a C program to input side of an equilateral triangle from user and find area of the given equilateral triangle.


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);