#include<stdio.h>
#include<math.h>
int main()
{
float a,x,y,w,g,s,area,b,c,hg,radius,ho;
printf("enter the value of one side:");
scanf("%f",&a);
printf("enter the lengths:");
scanf("%f%f",&x,&y);
w=2*x;
g=2*y;
s=(a+w+g)/2;
area=3*sqrt(s*(s-w)*(s-g)*(s-a));
printf("the area of the triangle is:%f",area);
b=(2*area)/(3*(w+x));
c=(2*area)/(3*(g+y));
radius=(a*b*c)/(4*area);
ho=sqrt((9*radius*radius)-(a*a+b*b+c*c));
hg=(2/3)*ho;
printf("the diatance is:%f",hg);
system("pause");
return 0;
}
the area comes right but the distance hg shows -1.#IND00 which i think means that the value of points are very very large...can anybody tell me the process of solving this error expect using the BIGFLOAT library