Wap to find the palindrome word

DECLARE FUNCTION REV$ (S$)
CLS
INPUT "ENTER ANY STRING"; S$
P$ = S$
IF P$ = REV$(S$) THEN
PRINT "THE GIVEN WORD IS PALINDROME "
ELSE
PRINT " THE GIVEN NO. IS NOT PALINDROME"
END IF
END

FUNCTION REV$ (S$)
FOR I = LEN(S$) TO 1 STEP -1
B$ = MID$(S$, I, 1)
W$ = W$ + B$
NEXT I
REV$ = W$
END FUNCTION

Comments

Popular posts from this blog

Journey With Jagat Mandir❣️

MY FATHER