Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "Enter No : "
- read no
- m=$no
- rev=0
- while [ $no -gt 0 ]
- do
- r=`expr $no % 10`
- rev=`expr $rev \* 10 + $r`
- no=`expr $no / 10`
- done
- if [ $m = $rev ]
- then
- echo "Is Palindrome"
- else
- echo "Not Palindrome"
- fi
Add Comment
Please, Sign In to add comment