#include <stdio.h>
#include <math.h>
int main()
{
int s, sidea, sideb, sidec, area;
printf("Enter the side of triangle a, b and c \n");
scanf("%d %d %d", &sidea, &sideb, &sidec);
s = (sidea + sideb + sidec) / 2;
area = sqrt(s * (s - sidea) * (s - sideb) * (s - sidec));
printf("Area of a triangle = %d \n", area);
}
#include <math.h>
int main()
{
int s, sidea, sideb, sidec, area;
printf("Enter the side of triangle a, b and c \n");
scanf("%d %d %d", &sidea, &sideb, &sidec);
s = (sidea + sideb + sidec) / 2;
area = sqrt(s * (s - sidea) * (s - sideb) * (s - sidec));
printf("Area of a triangle = %d \n", area);
}
No comments:
Post a Comment