clear echo " NUMBER PALINDROME OF NOT" echo " ========================" echo "ENTER NUMBER : " read no temp=$no revno=0 while [ $no -ne 0 ] do a=`expr $no % 10` no=`expr $no / 10` revno=`expr $revno \* 10 + $a` done if [ $temp -eq $revno ];then echo "Number is palindrome" else echo "Number is not palindrome" fiOutput:
0 comments:
Post a Comment