java program to find area of triangle

Solutions on MaxInterview for java program to find area of triangle by the best coders in the world

showing results for - "java program to find area of triangle"
Valeria
17 Jan 2018
1import java.util.Scanner;
2public class FindAreaOfTriangle
3{
4   public static void main(String[] args)
5   {
6      Scanner sc = new Scanner(System.in);
7      System.out.println("Please enter width of triangle: ");
8      double base = sc.nextDouble();
9      System.out.println("Please enter height of triangle: ");
10      double height = sc.nextDouble();
11      // formula area of triangle = (width * height) / 2
12      double area = (base * height) / 2;
13      System.out.println("Area of triangle is: " + area);
14      sc.close();
15   }
16}
queries leading to this page
write a program to find the area of triangle 2c circle and aquare in javawrite a program to print the area of triangle javawrite java methods to calculate the area of a triangleget triangle area javajava triangle area formulaprogram that finds the area of a right triangle in javajava how to calculate triangle areahow to calculate the area of a triangle in javaarea of triangle formula javahow to find the area of a right triangle in javajava method to calculate area of trianglejava program to calculate the area of trianglearea of a triangle in javacalculating area of triangle using constructoe in javatriangle area in javahow to find the area of a triangle javaarea triangle javajava code example to calculate the area of trianglearea of triangle in javajava program to find area of triangle when three sides are givenfind the area of a triangle in javaarea of triangle using javacalculating the area of a triangle javaprogram that finds the area of a triangle in javaarea of triangle javacalculate the area of triangle in javasimple java program for area of trianglecalculate area of triangle in javaallintitle 3ajava program to find area of triangle triangle area program in javatriangle area formula in javaarea of triangle formula program in javajava program to find area of trianglejava area of trianglewrite java methods to calculate the area of a triangle calculating the area triangle java area of triangle program in javafind area of triangle in javaprogram that finds the area of a right trianglein javaarea triangle javaprogram that finds the area of any triangle in javaarea of triangle java programto find area of triangle javajava program to find area of triangle