The solution is :


echo "Enter a positive integer"
read integer

until test $integer -eq 0
do
num=`expr $integer %10`
echo "$num \c"
integer=`expr $integer/10`

done

0 comments