All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Minimum area of a triangle (Posted on 2008-07-30)
Find the minimum area of a triangle whose sides and altitudes are six different integers.

 See The Solution Submitted by pcbouhid Rating: 2.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 My Perl Program | Comment 5 of 10 |
` `
`# mta.pluse warnings;use strict;{`
`my \$a;my \$b;my \$c;my \$ha;my \$hb;my \$hc;my \$s;`
`    for (\$c=3;\$c<200;\$c++) {      for (\$b=\$c-1;\$b>1;\$b--) {        for (\$a=\$b-1;\$a>\$c-\$b;\$a--) {          \$s = (\$a+\$b+\$c)/2;          \$hc = 2*sqrt(\$s*(\$s-\$a)*(\$s-\$b)*(\$s-\$c))/\$c;          if (int(\$hc)==\$hc) {            \$hb = \$c*\$hc/\$b;            if (int(\$hb)==\$hb) {              \$ha = \$c*\$hc/\$a;              if (int(\$ha)==\$ha) {                if (\$c*\$c!=\$a*\$a+\$b*\$b) {                  if (\$ha!=\$a) {                    print "c = ",\$c,",b = ",\$b,",a = ",\$a,"\n";                    print "hc = ",\$hc,",hb = ",\$hb,",ha = ",\$ha,"\n";                  }                }              }            }          }                  }      }    }`
`}`

 Posted by Bractals on 2008-07-30 19:20:49

 Search: Search body:
Forums (0)