29.PALINDROME WORD.
DECLARE SUB REV (N)
CLS
INPUT “ENTER ANY NUMBER”;N
CALL REV (N)
END
SUB REV (N)
S=0
A=N
WHILE N<>0
R= N MOD 10
S= S*10+R
N= N\10
WEND
IF A=S THEN
PRINT “THE GIVEN NO. IS PALINDROME”
ELSE
PRINT “THE GIVEN NO.
IS NOT PALINDROME”
END IF
END
No comments:
Post a Comment
beautiful