Palindrome no of string



DECLARE SUB PAL(N$)
CLS
INPUT"ENTER ANY WORD";H$
CALL PAL(N$)
END
SUB PAL(N$)
FOR I=LEN(N$) TO 1  STEP-1
B$=MID$(N$,I,1)
C$=C$+B$
NEXT I
IF N$=C$ THEN
PRINT"THE GIVEN WORD IS PALINDROME"
ELSE
PRINT"THE GIVEN WORD IS NOT PALINDROME"
END IF
END SUB

Comments

Popular posts from this blog

My journey in jagat mandir school

experience of SEE exam cancelled and covid -19