Testing Palindrome

CLS
INPUT "Enter string to be tested: ";t$
t$=LCASE$(t$)
FOR I=LEN(t$) TO 1 STEP -1
  r$=r$+MID$(t$, I, 1)
NEXT I
IF r$=t$ THEN
  PRINT t$; " is Palindrome!"
ELSE
  PRINT t$; " is not Palindrome!"
ENDIF
END

8 comments:

  1. its was the most easiest one thanks for it and now you need to post a video on youtube explaining the use of codes with their condition

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. This comment has been removed by the author.

      Delete
  2. WAP to input a string and display the initials only

    ReplyDelete