shell实现99乘法表

#!/usr/bin/env sh

for ((x=1;x<10;x++));do
    for ((y=1;x>=y;y++));do
         printf "${y}x${x}=$(expr ${x} \* ${y}) "
    done
    echo -e "\n"
done

相关推荐