-fuzzyping#!/usr/bin/perl use strict; my ($a, $b, $c); my $max = shift || die "Usage: pythag.pl <max len>\n"; for ($a=1; $a<$max; $a++) { for ($b=1; $b<$max; $b++) { for ($c=1; $c<$max; $c++) { if ((($a**2) + ($b**2)) == ($c**2)) { print "$a $b $c is a winner\n"; } } } }
In reply to Pythagorean's theorem by fuzzyping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |