echo 'Enter a number'
read n
digit=$n
rev=0
while [ $n -gt 0 ]
do
r=`expr $n % 10`
rev=`expr $rev \* 10 + $r`
n=`expr $n / 10`
done
if [ $rev -eq $digit ]
then
echo 'THE GIVEN NUMBER AND ITS REVERSE ARE SAME'
else
echo 'THE GIVEN NUMBER AND ITS REVERSE ARE NOT SAME'
fi
To embed this project on your website, copy the following code and paste it into your website's HTML: