Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package firstStepsInCoding.MoreExercises;
- import java.util.Scanner;
- public class TriangleArea {
- public static void main(String[] args) {
- Scanner scanner= new Scanner(System.in);
- double a =Double.parseDouble(scanner.nextLine());
- double h =Double.parseDouble(scanner.nextLine());
- double result =(a*h)/2;
- System.out.printf("%.2f",result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement