Friday, 16 May, 2025

1:13 pm [NEPAL, GMT+5:45]

Coming Soon .... !

WAP to check whether the given number is Palindrome.

Question

Write a program to check whether the given number is palindrome.

Ans:

      INPUT “Enter the Number ” ; NUM

      N = NUM

      DO            

      DIGIT = NUM MOD 10

      REVERSE = REVERSE * 10 + DIGIT

      NUM = NUM 10

      LOOP WHILE NUM < > 0

      IF N = REVERSE THEN PRINT N;
“palindrome” ELSE PRINT N; “not palindrome

END