Sunday, 10 May, 2026

5:16 pm [NEPAL, GMT+5:45]

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

 

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.