You are on page 1of 2

echo "Enter the no.

of elements of the array:" read n echo "Enter the elements of the array:" i=0 while [ $i -lt $n ] do read a[$i] done i=0 j=0 while [ $i -lt $n ] do b=$n-2-$i while [ $j -lt $b ] do if [ ${a[$j] -!t ${a[$j"#] ] then $$ tem%=${a[$j] && $$ ${a[$j] =${a[$j"#] && $$ ${a[$j"#] =tem% && fi j=$j"# done i=$i"# done i=0 echo "'he sorted array is:" while [ $i -lt $n ] do echo ${a[$i] done ()'*)': Enter the no. of elements of the array: + Enter the elements of the array: ,+. /0 2# #+ 'he sorted array is: #+ 2# ,+. /0

You might also like