Shell 編程--數組冒泡排序

[root@localhost ~]# vim maopao.sh #!/bin/bash array=(3 6 7 4 2) for ((i=1; i<${#array[*]}; i++)) do for ((j=0; j<${#array[*]}-i; j++)) do if [ ${array[$j]} -lt ${array[$[$j+1]]} ];then
相關文章
相關標籤/搜索