zoukankan      html  css  js  c++  java
  • ~图形脚本加(双色球小脚本)*

    #!/bin/bash
    #99乘法口诀
    for i in {1..9}
    do
            for j in {1..9}
            do
                    if [ $j -le $i ]
                    then
                            echo -n " ${j}x${i}=$(($i*$j)) "
                    fi
            done
            echo
    done
    echo
    echo
    #三角形  变  M 形
    for ((i=1;i<=9;i++))
    do
            for ((j=1;j<=$i;j++))
            do
                    echo -n "*"
            done
            for ((j=1;j<=$i;j++))
            do
                    echo -n " "
            done
            for ((j=9;j>=$i;j--))
            do
                    echo -n " "
            done
            for ((j=1;j<=$i;j++))
            do
                    echo -n " "
            done
    #隔开
            for ((j=9;j>=$i;j--))
            do
                    echo -n "*"
            done
            for ((j=1;j<=$i;j++))
            do
                    echo -n "*"
            done
            for ((j=1;j<=$i;j++))
            do
                    echo -n " "
            done
            for ((j=9;j>$i;j--))
            do
                    echo -n "*"
            done
            for ((j=9;j>=$i;j--))
            do
                    echo -n "*"
            done
             for ((j=1;j<=$i;j++))
            do
                    echo -n " "
            done
            for ((j=9;j>=$i;j--))
            do
                    echo -n "*"
            done
            for ((j=1;j<=$i;j++))
            do
                    echo -n "*"
            done
            echo
    done
    echo
    echo
    #金字塔形
    for ((i=1;i<=9;i++))
    do
            for ((j=9;j>=$i;j--))

            do
                    echo -n " "
    done
            for ((j=1;j<=$i;j++))
            do
                    echo -n "*"
            done
            for ((j=1;j<$i;j++))
            do
                    echo -n "*"
            done
            echo
    done
     

    echo
    echo
    #长方形
    for ((i=1;i<=9;i++))
    do
            for ((j=9;j>=$i;j--))

            do
                    echo -n "*"
    done
            for ((j=1;j<=$i;j++))
            do
                    echo -n "*"
            done
            echo
    done
    echo
    echo
    #结束了
    #双色球
    echo "第19100期开奖结果 开奖日期:$(date +'%F %T')"
    touch /number
    aa=0
    for ((i=1;${aa}<6;i++))
    do
            num=$(expr $RANDOM % 33 + 1)
            cat /number | grep $num  &> /dev/null
            if [ $? -ne 0 ]
            then    echo "$num" >> /number
                    echo -en "33[31m$num 33[0m"
                    let aa++
            else continue
            fi
    done
    echo -en "33[34m$(expr $RANDOM % 16 + 1)33[0m"
    echo
    rm -rf /number

    #结束了
  • 相关阅读:
    [atARC088F]Christmas Tree
    [atARC109F]1D Kingdom Builder
    [luogu4259]寻找车位
    [atARC087F]Squirrel Migration
    [atARC087E]Prefix-free Game
    [atARC110F]Esoswap
    [atARC110E]Shorten ABC
    [atARC084D]Small Multiple
    [atARC083F]Collecting Balls
    [hihocoder][Offer收割]编程练习赛49
  • 原文地址:https://www.cnblogs.com/123456likun/p/11438493.html
Copyright © 2011-2022 走看看