import java.util.Scanner; Scanner sc = new Scanner(System.in) System.out.println("Háromszög területe") System.out.print("Alap: ") double base = sc.nextDouble() System.out.print("Magasság: ") double height = sc.nextDouble() double area = base * height / 2 System.out.println("Terület: " + area) /exit