for循环-等腰三角形

#!/bin/bash
read -p "请输入行数:" line
for ((i=1;i<=line;i++));do
for ((k=1;k<=line-i;k++));do
echo -e " c"
done
for ((j=1;j<=2*i-1;j++));do
echo -e "*c"
done
echo
done
发表评论

相关文章