方法一
!/bin/bashfor i in seq 9
do
for j in seq 9
do
[ $i -ge $j ]
if [ $? -eq 0 ];then
echo -n " $i$j=$[ij]"
fi
done
echo
done
方法二
for i in seq 9
do
for j in seq $i
#//j小于等于i
do
echo -n " $i$j=$[ij]"
done
echo
done
方法一
!/bin/bashfor i in seq 9
do
for j in seq 9
do
[ $i -ge $j ]
if [ $? -eq 0 ];then
echo -n " $i$j=$[ij]"
fi
done
echo
done
方法二
for i in seq 9
do
for j in seq $i
#//j小于等于i
do
echo -n " $i$j=$[ij]"
done
echo
done
相关课程
热门评论
同学怎么称呼可不可以请教一下