Javatpoint Logo
Javatpoint Logo

Program to find the area of the right angle triangle

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

  1. Define Values for the base and height of the triangle
  2. Enter values in the formula.
  3. Print the Area.

Complexity

O(1)


Solution

Python

Output:

Area of Right Angle Triangle is:  20.0

C

Output:

Area of Right Angle Triangle is : 20.0000

JAVA

Output:

Area of Right Angle Triangle is : 20.0

C#

Output:

Area of Right Angle Triangle is: 20.0

PHP

Output:

Area of Right Angle Triangle is : 20

Next Topic#




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA