Find all integer sided triangles whose area and perimeter have the same numerical value.
6 8 10
5 12 13
9 10 17
7 15 20
6 25 29
There might be some larger triangles, extremely thin, but it looks as if they stop here.
List produced by
DEFDBL A-Z
FOR t = 3 TO 1000000
FOR a = 1 TO t / 3
FOR b = a TO (t - a) / 2
IF b > t / 2 - a THEN
c = t - a - b: s = t / 2
areasq = s * (s - a) * (s - b) * (s - c)
area = INT(SQR(areasq) + .5)
IF area * area = areasq THEN
IF area = t THEN
PRINT a, b, c
END IF
END IF
END IF
NEXT b
NEXT a
NEXT t
|
Posted by Charlie
on 2006-06-21 16:08:16 |