#!/bin/bash
read -p “请输入行数:” zk
for ((i=0;i<
z
k
;
i
+
+
)
)
d
o
f
o
r
(
(
j
=
zk;i++)) do for((j=
zk;i++))dofor((j=zk;j>i+1;j–))
do
echo -ne " "
done
for ((n=2i+1;n>0;n–))
do
echo -ne ""
done
echo
done
for((i=
z
k
;
i
>
0
;
i
−
−
)
)
d
o
f
o
r
(
(
j
=
zk;i>0;i--)) do for((j=
zk;i>0;i−−))dofor((j=zk-1;j>=i;j–))
do
echo -ne " "
done
for((n=0;n<2i-1;n++))
do
echo -ne ""
done
echo
done
实验 shell-菱形
最新推荐文章于 2020-12-21 17:43:21 发布