Program to determine given string is Palindrome
CLS
INPUT "Enter a String"; a$
FOR i = LEN(a$) TO 1 STEP -1
d$ = d$ + MID$(a$, i, 1)
NEXT i
IF (d$ = a$) THEN
PRINT "Given string is Palindrome"
ELSE
PRINT "Given string is not Palindrome"
END IF
END
0 Comments
Thank You ! For your love