OpenInputFile
Read a line from the file
while(the input was successful)
Type = Classify Palindrome(line)
Print Classification
Read a line from the file
Close the input file
Prompt user for file name
Attempt to open the file
If unable to open the file print an error
if IsPalindrom(line)
return that it is a "Perfect Palindrom"
else
Strip the punctuation from the line
Change the line to lower case
if IsPalindrom(line)
return that it is a "Natural Palindrom"
else
Strip all but alphabetic characters from the line
if IsPalindrom(line)
return that it is a "Palindrom"
else
return that it is a "Non-palindrome"
for each letter in the string
if the letter is upper case, convert it to lower case.
set return value to blank
for each letter in the string
if it is not punctuation, add it to the return string
return the return string.
set return value to blank
for each letter in the string
if it is an alphabetic character, add it to the return string
return the return string.
returnValue = true
for each letter between position 0 and size/2
if the letter does not match the letter the same distance from the other end
returnValue = false;
return returnValue
print quotes
print the line
print quotes
print classification
print newline