Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C++。 Why can't you work out the area like this?
C++。 Why can't you work out the area like this?
If there is something wrong with the conditions of the triangle, it should be changed to if ((a+b >; C) and amp&(a+c >; B) and&(b+c > a));

At the same time, we should put

area=pow((s*(s-a)*(s-b)*(s-c)),( 1/2);

Area = pow ((s * (s-a) * (s-b) * (s-c)),( 1.0/2); Because 1 and 2 are plastic data, the result is still plastic, that is, 1 divided by 2 equals 0, which is why you can't find your area.