Write a C program to Calculate Area of an Equilateral Triangle
Program:-
#include <stdio.h>
#include <math.h>
#include <conio.h>
int main()
{
float a, area;
printf("Enter the length of side of triangle\n");
scanf("%f ", &a);
area = sqrt(3/4)*a*a;
printf("Area of triangle : %f", area);
getch();
return 0;
}
Output :-
Input:
Enter the side of the Triangle
a=?
a=?
Output:-
...
0 comments:
Post a Comment