Skip to content

Instantly share code, notes, and snippets.

@allenfisher
Created March 18, 2018 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allenfisher/8a8a5a230156c090b3c07738d3044f04 to your computer and use it in GitHub Desktop.
Save allenfisher/8a8a5a230156c090b3c07738d3044f04 to your computer and use it in GitHub Desktop.
Hanging code...
$coeff = $args[0]
$power = $coeff.length
$i = 0
$e = ""
while($power -ge 0)
{
if (($coeff[$i]) -eq 0) {continue}
$term = [String]$coeff[$i]
$term = $term +"x^"
$term = $term+[String]$power
Write-Output $term
$i++;$power--
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment