import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
public static void main
(String[] args
) {
float a, b, c;
Scanner scanner
= new Scanner
(System.
in); System.
out.
println("Enter values: "); a = scanner.nextFloat();
b = scanner.nextFloat();
c = scanner.nextFloat();
if (a + b >= c || b + c >= a || a + c >= b) {
float p = (a + b + c) / 2;
float S
= (float) Math.
sqrt(p
* (p
- a
) * (p
- b
) * (p
- c
)); float R = (a * b * c) / (4 * S);
float r = S/p;
System.
out.
println("Radius of incircle of triangle = " + r
+ "\nRadius of excircle of triangle = " + R
);
} else {
System.
out.
println("Wrong input data. Triangle doesn't exist");} }
}
CmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwoKY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKQoJewoJCWZsb2F0IGEsIGIsIGM7CiAgICAgICAgU2Nhbm5lciBzY2FubmVyID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIkVudGVyIHZhbHVlczogIik7CiAgICAgICAgYSA9IHNjYW5uZXIubmV4dEZsb2F0KCk7CiAgICAgICAgYiA9IHNjYW5uZXIubmV4dEZsb2F0KCk7CiAgICAgICAgYyA9IHNjYW5uZXIubmV4dEZsb2F0KCk7CgogICAgICAgIGlmIChhICsgYiA+PSBjIHx8IGIgKyBjID49IGEgfHwgYSArIGMgPj0gYikgewoJCQlmbG9hdCBwID0gKGEgKyBiICsgYykgLyAyOwogICAgICAgICAgICBmbG9hdCBTID0gKGZsb2F0KSBNYXRoLnNxcnQocCAqIChwIC0gYSkgKiAocCAtIGIpICogKHAgLSBjKSk7CiAgICAgICAgICAgIGZsb2F0IFIgPSAoYSAqIGIgKiBjKSAvICg0ICogUyk7CiAgICAgICAgICAgIGZsb2F0IHIgPSBTL3A7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiUmFkaXVzIG9mIGluY2lyY2xlIG9mIHRyaWFuZ2xlID0gIiArIHIgKyAiXG5SYWRpdXMgb2YgZXhjaXJjbGUgb2YgdHJpYW5nbGUgPSAiICsgUik7CiAgICAgICAgICAgIAogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiV3JvbmcgaW5wdXQgZGF0YS4gVHJpYW5nbGUgZG9lc24ndCBleGlzdCIpO30KCX0KfQ==