首页 > 代码库 > shell九九乘法表

shell九九乘法表

#!/bin/bash
for x in {1..9}; do
    for y in {1..9}; do
        if [ $x -ge $y ]; then
            echo -ne "$y*$x=$[$y*$x] \t" 
        fi
    done
    echo
done

 

shell九九乘法表