Wednesday, October 2, 2019

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

No comments:

Post a Comment

My JM Experience

School life is very important part of one's life, because it provides opportunity for study and discipline. Besides these, the scho...