The only reason this code should give you error is if you input something else that float, let's say letter [...]
scanf() would return an EOF in that case.
No it will not. It will return zero in that case.
EOF is only returned upon reaching end of input. If there is input in the stream that does not correspond to what is expected (via the format string) scanf() returns the number of fields successfully read. If there is one value to be read, and none are, the return value is zero.
Not that it matters: the return value of scanf() is not being checked.
In any event, the code that is posted is probably different from the code being compiled. And the difference is where the error is.
printf("enter the value of one side:");
printf("enter the lengths:");
printf("the area of the triangle is:%f",area);
printf("the diatance is:%f",hg);
i got the area
but the distance is giving the value-1.#IND00 ,i think the value of points are very very long so cant take if can u give me a solution to it expect that for importing a BIGFLOAT library..