Explanation
A Triangle having one interior angle of 90 degrees as right angle is called as Right Angle Triangle which has a Hypotenuse(the side opposite to its right angle ), base and height.
Area of Right Angle Triangle = ½ ( b × h)
b is base and h is height.
Algorithm
- Define Values for the base and height of the triangle
- Enter values in the formula.
- Print the Area.
Complexity
O(1)
Input:
b = 5
h = 8
Output:
Area of Triangle = (b * h) / 2
= (5 * 8) / 2
= 20.0
Python
Output:
C
Output:
JAVA
Output:
C#
Output:
PHP
Output: