Create an algorithm for the area of a right-angled triangle if the hypotenuse and leg are known.

We know that the area of ​​a right-angled triangle is half the product of the lengths of the legs. That is, the formula for the area of ​​a rectangular triangular will look like this:

S = 1/2 * a * b

where:

S is the area of ​​a right-angled triangle;

a, b – legs.

From the condition of the problem, we know the length of one of the legs (let it be leg a) and the length of the hypotenuse (denote it as c)

Therefore, we need to find the length of the leg b. We can find it based on the Pythagorean theorem. This theorem states that the sum of the squares of the lengths of the legs is equal to the square of the length of the hypotenuse. Mathematically, this theorem looks like this:

c ^ 2 = a ^ 2 + b ^ 2

Let us express the leg b from this formula:

b ^ 2 = c ^ 2 – a ^ 2

b = √ (c ^ 2 – a ^ 2)

Then the formula for finding the area of ​​a right-angled triangle will take the form:

S = 1/2 * a * b = 1/2 * a * √ (c ^ 2 – a ^ 2)

Algorithm for finding the area of ​​a right-angled triangle Let us write down the formula for finding the area of ​​a right-angled triangle;
find the leg through the Pythagorean theorem;
substitute the obtained values ​​into the original formula for finding the area;
find the area of ​​a right-angled triangle.

Let’s consider an example
Suppose we have a right-angled triangle in which the hypotenuse is c = 5 cm, and the leg a = 3 cm. Find the area of ​​the triangle.

Solution:

S = 1/2 * a * b

Leg b:

b = sqrt (c2 – a2) = sqrt (52 – 32) = sqrt (25 – 9) = sqrt 16 = 4 cm;

Then the area: S = 1/2 * a * b = 1/2 * 3 * 4 = 3 * 2 = 6 cm2



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.