#include<stdio.h>
#include<math.h>
#include<math.h>
int main()
{
double a, b, c, s, area;
{
double a, b, c, s, area;
printf("\nEnter the sides of triangle: \n");
scanf("%lf%lf%lf", &a, &b, &c);
scanf("%lf%lf%lf", &a, &b, &c);
s = (a + b + c) / 2;
area = sqrt(s * (s - a) * (s - b) * (s - c));
area = sqrt(s * (s - a) * (s - b) * (s - c));
printf("\nArea of triangle using Heron's Formula: %.2lf\n", area);
return 0;
}
}
Output :
Enter the sides of triangle: 6 4 5 Area of triangle using Heron's Formula: 9.92
0 Comments