//package testjava;
import java.util.Scanner;
public class Main {
public static void main
(String[] args
) { Scanner input
= new Scanner
(System.
in); System.
out.
println("Nhap vao canh a: "); int a = input.nextInt();
System.
out.
println("Nhap vao canh b: "); int b = input.nextInt();
System.
out.
println("Nhap vao canh c: "); int c = input.nextInt();
float p = (a + b + c) / 2;
if (((a + b) > c) && ((b + c) > a) && ((a + c) > b)) {
System.
out.
println("Dien tich tam giac la:" + (Math.
sqrt(p
* (p
- a
) * (p
- b
) * (p
- c
)))); } else
System.
out.
println("Khong phai la tam giac"); }
}
Ly9wYWNrYWdlIHRlc3RqYXZhOwoKaW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW4gewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewoJCVNjYW5uZXIgaW5wdXQgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCVN5c3RlbS5vdXQucHJpbnRsbigiTmhhcCB2YW8gY2FuaCBhOiAiKTsKCQlpbnQgYSA9IGlucHV0Lm5leHRJbnQoKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oIk5oYXAgdmFvIGNhbmggYjogIik7CgkJaW50IGIgPSBpbnB1dC5uZXh0SW50KCk7CgkJU3lzdGVtLm91dC5wcmludGxuKCJOaGFwIHZhbyBjYW5oIGM6ICIpOwoJCWludCBjID0gaW5wdXQubmV4dEludCgpOwoJCWZsb2F0IHAgPSAoYSArIGIgKyBjKSAvIDI7CgkJaWYgKCgoYSArIGIpID4gYykgJiYgKChiICsgYykgPiBhKSAmJiAoKGEgKyBjKSA+IGIpKSB7CgkJCVN5c3RlbS5vdXQucHJpbnRsbigiRGllbiB0aWNoIHRhbSBnaWFjIGxhOiIKCQkJCQkrIChNYXRoLnNxcnQocCAqIChwIC0gYSkgKiAocCAtIGIpICogKHAgLSBjKSkpKTsKCQl9IGVsc2UKCQkJU3lzdGVtLm91dC5wcmludGxuKCJLaG9uZyBwaGFpIGxhIHRhbSBnaWFjIik7Cgl9Cn0K