Program design of calculating triangle area with Helen formula

The method of programming and calculating triangle area with Helen formula;

1. First, we need to get three sides of the triangle. These side lengths can be obtained in various ways, such as from user input, function parameters or calculation. In programming, variables are usually used to store these side lengths.

2. Step 2, calculate the half circumference. The half circumference is half of the sum of the three sides of a triangle. We can get the half circumference by adding three sides and dividing by two. This step can be expressed as p=(a+b+c)/2 in the mathematical expression.

3. The third step is to calculate the area with Helen's formula. Helen's formula is based on the length of three sides of a triangle. It calculates the product of the difference between the semi-circumference and the length of three sides, and then finds the square root to get the area of the triangle. This step can be expressed mathematically as area=sqrtp*(p-a)*(p-b)*(p-c).

Knowledge of Helen's formula

1, Helen formula, also known as Qin formula, is a mathematical formula for calculating the area of a triangle. It was put forward by Qin, a mathematician in the Southern Song Dynasty in China, in his book Shu Shu Jiu Zhang. The main advantage of this formula is that only the lengths of three sides of a triangle need to be known, so the area of the triangle can be calculated directly without knowing the shape or direction of the triangle.

2. Helen formula is widely used in mathematics and engineering applications. Mathematically, it can be used to study the nature and judgment of triangles, such as judging whether triangles are right triangles or isosceles triangles. In engineering applications, it can be used to calculate triangle areas of various shapes and sizes, such as geometry, physics, architectural design and other fields.

3. There are many ways to prove Helen's formula, such as trigonometric function and product sum and difference formula. The key to the proof is to convert the three sides of a triangle into angles, and then simplify the calculation by trigonometric function and multiplication and division formula.