Answers
Answered by
7
import java.util.*;
public class Area
{
public static void main(String args[])
{
Scanner in= new Scanner(System.in);
int x,z,a;
System.out.println("Enter the height of the triangle");
x=in.nextInt();
System.out.println("Enter the base of the triangle");
z=in.nextInt();
a= (1/2)*x*z;
System.out.println("The area of the triangle is"+a);
}
}
Similar questions