hey,
i am beginner, i made was asked to make a program that would make use of the heron's formula, and some knowledge regarding functions to find the area of a triangle.well, i did, but there was this one problem which i was not able to figure out.here it is " it's giving the wrong answer!!! ".
i don't know why. i went through each and every single step of the program and found no flaw. please help me find the flaw in my program.
to be a bit more specific:-
actually i programmed it in such a way that, when i give in the 3 sides of a triangle, it calculates the area of the triangle, by making use of the heron's formula,
well when i give in the values of the 3 sides, it calculates and gives the wrong answer(wrong area)!!
here's the code
int ss=(se+sr+st)/2;
int ree=0;
ree=sqrt((ss-se)*(ss-sr)*(ss-st));
return ree;
--here is the link to the whole program just in case u want to take a look at it.
link