一个什么都学的老程序员  
C#和PHP学习历程
#!/bin/sh
echo "大九九乘法表"
for i in 1 2 3 4 5 6 7 8 9
do
for j in 1 2 3 4 5 6 7 8 9
do
let "sum=i*j"
printf "$i*$j=$sum \t"
done
printf "\n"
done

#!/bin/sh
echo "小九九乘法表"
for i in 1 2 3 4 5 6 7 8 9
do
j=1
while [ $j -le $i ]
do
let "sum=i*j"
printf "$j*$i=$sum \t"
let "j=j+1"
done
printf "\n"
done





posted on 2006-11-22 17:31  剑落飘香  阅读(794)  评论(0编辑  收藏  举报