C program to find area of an equilateral triangle






C program to find area of equilateral triangle
How to calculate area of an equilateral triangle in c programming language


#include<stdio.h>
#include<math.h>
int main(){
    float side;
    float area;
    printf("Enter length of any side of equilateral triangle: ");
    scanf("%f%",&side);
    area = (sqrt(3)/2)*(side*side);
    printf("Area of equilateral triangle : %f",area);
    return 0;
}



Post a Comment