Created
May 26, 2014 08:04
-
-
Save jtuttas/a6c1029e5e2943b3c789 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hmax = read-host Maximale Länge für Hypothenuse eingeben!; | |
for ($j=1; $j -le $hmax; $j++){ | |
for ($k=1; $k -lt $j; $k++){ | |
$h= [math]::Sqrt(($j * $j)+($k * $k)); | |
if ($h % 1.0 -eq 0.0 -and $h -le $hmax){ | |
write-host $h + $j + $k; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment