<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-bidi-font-family: Mangal;">echo “Enter the number”
read n
sd=0
rev=0
while \[ $n -gt 0 \]; do
sd=$(( $n % 10 ))
rev=$(( $rev \* 10 + $sd ))
n=$(( $n / 10 ))
done
echo “Reverse of entered digit is $rev”</span>
Leave a comment