Skip to content

Instantly share code, notes, and snippets.

@rxw1
Created January 24, 2018 04:08
Show Gist options
  • Save rxw1/df2fa76310737728c29e3b5be678bc74 to your computer and use it in GitHub Desktop.
Save rxw1/df2fa76310737728c29e3b5be678bc74 to your computer and use it in GitHub Desktop.
number pyramid
#!/usr/bin/env zsh
n=(
" 1 * 8 + 1"
" 12 * 8 + 2"
" 123 * 8 + 3"
" 1234 * 8 + 4"
" 12345 * 8 + 5"
" 123456 * 8 + 6"
" 1234567 * 8 + 7"
" 12345678 * 8 + 8"
"123456789 * 8 + 9"
)
for i in $n; do
echo $i = $(($i))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment