当前位置:网站首页>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
边栏推荐
- Initialize static resource demo
- Add / delete query of topic
- [ubuntu-mysql 8 installation and master-slave replication]
- Eight sorts (I)
- 无人机项目跟踪记录八十三---pcb图完成
- Distributed ID
- CentOS MySQL installation details
- 7.手机登陆功能开发
- Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle
- Abstract classes and interfaces
猜你喜欢
Framework program of browser self-service terminal based on IE kernel
无人机项目跟踪记录八十三---pcb图完成
Abstract classes and interfaces
oracle跨数据库复制数据表-dblink
Recommend a very easy-to-use network communication framework HP socket
CRF (conditional random field) learning summary
Notes on masking and padding in tensorflow keras
Oracle cross database replication data table dblink
How to build an all-in-one database cloud machine that meets the needs of information innovation?
Distributed ID
随机推荐
utils 协程
ABAP-时间函数
About the smart platform solution for business hall Terminal Desktop System
近期学习遇到的比较问题
2021-11-15
抽象类和接口
MySQL explain
工作小记: sendto失败 errno 22
Simple redis lock
Utils collaboration
Eight sorts (II)
Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)
Torch learning summary
布隆过滤器
2021-07-26
Distributed things
【AGC】构建服务3-认证服务示例
Redis docker master-slave mode and sentinel
关于字符串的split和join操作
How to reduce the delay in live broadcast in the development of live broadcast source code with goods?