The sides of a triangle are three consecutive integers and its inradius is 4. Find the circumradius.
for a=1:50
b=a+1; c=b+1;
s=(a+b+c)/2;
inrad=sqrt(s*(s-a)*(s-b)*(s-c))/s;
if inrad==4
R=(a*b*c)/sqrt((a+b+c)*(b+c-a)*(c+a-b)*(a+b-c));
fprintf('%3d %3d %3d %17.15f\n',[a b c R])
end
end
finds
a b c circumradius
13 14 15 8.125000000000000
i.e., 8 + 1/8
|
Posted by Charlie
on 2024-05-15 12:04:40 |