Write a Sub Procedure program that enters a number and checks whether it is palindrome number or not.
Answers
Answered by
0
Explanation:
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
Hope it's help you dear ❤️
Answered by
0
Answer:
USING FUNCTION PROCEDURE.
DECLARE FUNCTION PALIN (N) INPUT "ENTER ANY NUMBER"; N. P = PALIN ((N)) IF P = N THEN. PRINT N; "IS PALINDROME" ELSE. PRINT N; "IS NOT PALINDROME" END IF.
FUNCTION PALIN (N) S = 0. WHILE N < > 0. R = N MOD 10. S = S * 10 + R. N = N \ 10. WEND. PALIN = S.
Similar questions