DECLARE FUNCTION REV$(A$) CLS INPUT"ENTER ANY STRING"A$ P$=A$ IF P$=REV$(A$) THEN PRINT"THE GIVEN WORD IS PALINDROME" ELSE PRINT"THE GIVEN WORD IS NOT PALINDROME "; END IF END FUNCTION REV$(A$) FOR I= LEN (A$) TO 1 STEP-1 B$= MID$(A$,I,1) C$=C$+B$ NEXT I REV$=C$ END FUNCTION
Posts
Showing posts from November, 2019