- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAOT.java
More file actions
Latest commit
13 lines (13 loc) · 380 Bytes
/
Copy pathAOT.java
File metadata and controls
13 lines (13 loc) · 380 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
//Area of triangle
importjava.util.Scanner;
classAOT{
publicstaticvoidmain(String[] args){
Scannerinput= newScanner(System.in);
System.out.print("Enter the height: ");
floath= input.nextFloat();
System.out.print("Enter the base: ");
floatb= input.nextFloat();
floatarea=0.5f*b*h;
System.out.print("The area of the triangle is: "+area);
}
}