CLS

INPUT "ENTER ANY NUMBER"; N

A = N

S = 0

WHILE N < > 0

R = N MOD 10

S = S * 10 + R

N = N \ 10

WEND

IF A = S THEN

PRINT A; "IS PALINDROME"

ELSE

PRINT A; "IS NOT PALINDROME"

END IF

END

USING SUB PROCEDURE

DECLARE SUB PALIN (N)

CLS

INPUT "ENTER ANY NUMBER"; N

CALL PALIN (N)

END

SUB PALIN (N)

A = N

S = 0

WHILE N < > 0

R = N MOD 10

S = S * 10 + R

N = N \ 10

WEND

IF A = S THEN

PRINT A; "IS PALINDROME"

ELSE

PRINT A; "IS NOT PALINDROME"

END IF

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION PALIN (N)

CLS

INPUT "ENTER ANY NUMBER"; N

P = PALIN ((N))

IF P = N THEN

PRINT N; "IS PALINDROME"

ELSE

PRINT N; "IS NOT PALINDROME"

END IF

END

FUNCTION PALIN (N)

S = 0

WHILE N < > 0

R = N MOD 10

S = S * 10 + R

N = N \ 10

WEND

PALIN = S

END FUNCTION

## No Comments