Anonymous user
Heronian triangles: Difference between revisions
m
→{{header|REXX}}: put statements on same line instead of splitting them for perusability.
(→{{header|REXX}}: added check for: if side A is even, sides B and C must be odd. This decreased execution time by around 1/3.) |
m (→{{header|REXX}}: put statements on same line instead of splitting them for perusability.) |
||
Line 695:
Heron: @.=.; y=' '; minP=9e9; maxP=0; minA=9e9; maxA=0; Ln=length(N)
#=0; #.=0; #.2=1 #.3=1; #.7=1; #.8=1 /*¬good √.*/
do a=3 to
do b=a+ev to N by inc; ab=a+b /*AB: is used for summing below.*/
do c=b to N by inc; p=ab+c; s=p/2 /*calc Perimeter, S*/
|