Created
October 22, 2017 19:38
-
-
Save ouyi/5eae848913cab1b05a22e4eda578dfb4 to your computer and use it in GitHub Desktop.
Bash script to print out the Table of Multiplication Formulas for school kids
This file contains 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
#!/usr/bin/env bash | |
for i in {1..9}; do | |
for j in $(seq 1 $i); do | |
echo -n "$j x $i = $( printf '% 2s' $(( $i * $j ))) " | |
done | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: