Using base and height (Heron's formula)
This algorithm works for any triangle when you know the base length and the corresponding height.
Input:
Base length of the triangle (b)
Height of the triangle (h)
Calculate the area:
Area = (1/2) * b * h
Output:
The area of the triangle