Area of Triangle in Java

Area of Triangle in Java

Here you will know and get the program code to calculate the Area of Triangle in Java programming.

Formula

Area of Triangle = (width * height) / 2

Find Area of Triangle in Java

 

Output

C:\CodeRevise\java>javac TriangleArea.java

C:\CodeRevise\java>java TriangleArea
Enter the width of triangle : 12
Enter the height of triangle : 15
The area of the triangle is: 90.0

 

 

Check out our other Java Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top