Given two sides of a triangle, find the minimum and maximum possible area of the triangle.
the length of the third side has to be of integer-valued.
The results in the test suite seem to be based on the idea that the minimum and maximum areas are found by setting the third side to a3 = abs(a1-a2)+1 and a3=a1+a2-1, which is not correct. The correct maximum is somewhere in the middle. For example, in problem 2, the correct results are mn = 24.9987 and mx = 1250.0000.
yes.. i see that now.. my assumption was wrong.
Sorry for the misconception.
yet again we learn from our mistakes
The maximum areas you report in the test cases are mostly wrong.
yes yes i see
thanks for pointing that out
Return the 3n+1 sequence for n
Program an exclusive OR operation with logical operators
Back to basics 25 - Valid variable names
MATLAB Basic: rounding II
Inscribed circle in a triangle
Sum of series
Game of life - 01
Sum! Sum! Sum!
Sky full of stars - 01
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office