You are on page 1of 1

Begin

Declare
words[45] As char
no_Letters, max, x As integer
result As boolean
x<--0
Print "Enter the total number of letters in the word"
Read no_Letters
max<-- no_Letters-1
For x<--0 To max Do
Print "Enter the letters of the word one by one by pressing enter after
each letter"
Read words[x]
Endfor
x<--0
Repeat
If words[max]=words[x] Then
result=true
Else
result=false
Endif
x<--x+1
max<--max-1
Until result=false OR x=no_Letters
IF result=true Then
Print "The word is a palindrome"
Else
Print "The word is not a palindrome"
Endif
End

You might also like