用shell脚本写了个9x9乘法表,仅供参考!下有文本...
#!/bin/bash
#Author:victor Email:[email protected] Date:2016-09-17
#Release 1.0
#Function:9x9 multiplication table
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:~/bin
export PATH
function multiplication (){
for I in `seq 1 9`;do
for J in {1..9};do
[[ ${I} -ge ${J} ]] && echo -n "${J}x${I} = $((${I}*${J})) "
done
echo
done
}
multiplication
时间: 2024-11-19 15:52:48