//find the are of tringle using =sqrt((sa)(s-b)(s-c))
#include<stdio.h>
#include<math.h>
int main()
{
float s,a,b,c,area;
printf("Enter the three sides of the triangle\n");
scanf("%f%f%f",&a,&b,&c);
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("Area of the triangle is: %f",area);
return 0;
}
The Output of the Above Program:
Enter the three sides of the triangle
2
4
5
Area of the triangle is: 3.799671
--------------------------------
Process exited after 7.697 seconds with return value 0
Press any key to continue . . .