➽ Program:-

import java.util.*;

class Main

{

   public static void main(String args[])

   {  

      int base, height, area;

      Scanner sc = new Scanner(System.in);

 

      System.out.print("Enter the Base of the Triangle: ");

      base = sc.nextInt();

 

      System.out.print("Enter the Height of the Triangle:");

      height = sc.nextInt();

 

      area = (base * height) / 2;

      System.out.println("Area of Triangle is " + area);     

   }

}

➽ Output:-

Enter the Base of the Triangle: 18
Enter the Height of the Triangle:16
Area of Triangle is 144