当前位置:网站首页>Shell script multi loop experiment
Shell script multi loop experiment
2022-06-30 09:54:00 【thengsd】
Catalog
One 、99 Multiplication table
#!/bin/bash
for ((a=1;a<=9;a++))
do
for ((b=1;b<= a ; b + + ) ) d o c = a;b++)) do c= a;b++))doc=[ a ∗ a* a∗b]
echo -n -e “ a ∗ a* a∗b=$c\t”
done
echo “”
done

Two 、 rectangular
#!/bin/bash
for ((a=1;a<=5;a++))
do
for ((b=1;b<=10;b++))
do
echo -n “*”
done
echo “”
done
3、 ... and 、 A straight line
#!/bin/bash
for ((a=1;a<=15;a++))
do
echo -n “*”
done
echo “”
Four 、 Right triangle

5、 ... and 、 An inverted right triangle
#!/bin/bash
for ((a=1;a<=9;a++))
do
for ((b=9;b>=$a;b–))
do
echo -n “*”
done
echo “”
done
6、 ... and 、 Isosceles right triangle
#!/bin/bash
for ((a=1;a<=9;a++))
do
for ((b=9;b>=$a;b–))
do
echo -n " "
done
for ((c=1;c<= [ [ [a2-1];c++))
do
echo -n ""
done
echo “”
done
边栏推荐
- Properties of string
- Initialize static resource demo
- Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle
- Dart 开发技巧
- Datatabletomodellist entity class
- prometheus 监控之 ntp_exporter
- [new book recommendation] mongodb performance tuning
- (zero) most complete JVM knowledge points
- NER – Named Entity Recognition Summary
- How to build a private cloud and create a hybrid cloud ecosystem?
猜你喜欢

Pytorch graduate warm LR installation

布隆过滤器

Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)

【Ubuntu-redis安装】

Cloud native database

Add / delete query of topic

Idea shortcut key settings

Idea setting automatic package Guide

How to reduce the delay in live broadcast in the development of live broadcast source code with goods?

Deberta (decoding enhanced Bert with distinguished attention)
随机推荐
Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)
Simple redis lock
将小程序容器技术应用到物联网IoT生态建设中
Function simplification principle: save if you can
Framework program of browser self-service terminal based on IE kernel
Numpy (time date and time increment)
MySQL knowledge summary (useful for thieves)
抽象类和接口
Properties of string
Galaxy Kirin server-v10 configuration image source
单片机 MCU 固件打包脚本软件
Deberta (decoding enhanced Bert with distinguished attention)
Redis + MySQL implements the like function
关于字符串的split和join操作
qmlplugindump executable not found.It is required to generate the qmltypes file for VTK Qml
Bloom filter
Why won't gold depreciate???
Torch learning summary
utlis 内存池 对象池
基于Svelte3.x桌面端UI组件库Svelte UI