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}