• 周二. 10 月 8th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

阿铭每日一题 day 12 20180122

admin

11 月 28, 2021

方法一:

#!/bin/bash
#Author: Yang YuanQiang
#Blog1: http://aqiang.blog.51cto.com
#Blog2: http://www.cnblogs.com/ivan-yang/
#Time: 2018-01-23 14:18:46
#Name: day12_20180122.sh
#Version: V1.0
#Description: This is a script.

for((i=1;i<=$1;i++))
do
    for((j=$1;j>i;j--))
    do
        echo -n " "
    done
    for m in `seq 1 $i`
    do
        echo -n "* "
    done
    echo
done

发表回复