Skip to content

Instantly share code, notes, and snippets.

@dfinke
Created July 18, 2019 01:44
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 dfinke/b22d9b6d8249e21e5cb2c1055c77d14e to your computer and use it in GitHub Desktop.
Save dfinke/b22d9b6d8249e21e5cb2c1055c77d14e to your computer and use it in GitHub Desktop.
0..6 | ForEach {
$v = "1" + "0" * $_ + "3"
"{0,9}^2 = {1,15}" -f $v, [math]::Pow($v, 2)
}
@dfinke
Copy link
Author

dfinke commented Jul 18, 2019

Results

       13^2 =             169
      103^2 =           10609
     1003^2 =         1006009
    10003^2 =       100060009
   100003^2 =     10000600009
  1000003^2 =   1000006000009
 10000003^2 = 100000060000009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment