echo "enter the number of elements"
read n
echo "enter the elements:"
for ((i=1;i<=n;i++))
do
read a[$i]
done
for ((i=1;i<=n;i++))
do
for ((j=1;j<=n;j++))
do
if [ ${a[$i]} -lt ${a[$j]} ]
then
t=${a[$i]}
a[$i]=${a[$j]}
a[$j]=$t
fi
done
done
echo
echo "the sortted elements are:"
for ((i=1;i<=n;i++))
do
echo ${a[$i]}
done


OUTPUT

enter the number of elements
5
enter the elements:
17
5
23
7
11

the sortted elements are:
5
7
11
17
23