C Program to Find Area of Isosceles Triangle
Write C Program to Find the Area of an Isosceles Triangle
//Write a C Program to Find Area of Isosceles Triangle
#include <stdio.h>
#include <math.h>
int main()
{
float a, b, area;
printf("Enter Length of Isosceles Triangle's Same Sides :--> ");
scanf("%f", &a);
printf("Enter Length of Isosceles Triangle's Third side :--> ");
scanf("%f", &b);
//formula to find the area of the Isosceles triangle
area = (b * sqrt((4 * a * a) - (b * b)))/4;
printf("The Area of the Isosceles Triangle :--> %.2f\n", area);
return 0;
}
Output:
Enter Length of Isosceles Triangle's Same Sides :--> 6
Enter Length of Isosceles Triangle's Third side :--> 8
The Area of the Isosceles Triangle :--> 17.89