Program for Palindrome

cat filename|while read LINE
do
REVERSE=`echo "${LINE}"|rev`
if [ "${LINE}" = "${REVERSE}" ]
then
echo "Palidrome: ${LINE}"
fi
done

No comments:

Post a Comment