Write a program in C to check whether a given number is palindrome or not
Answer»
#include #include int main () { clrscr(); int n, num, digit, REV = 0 ; printf(INPUT the number:); SCANF("%d"num) ; n = num ; do { digit = num % 10 ; rev = ( rev * 10 ) + digit ; num = num / 10 ; } while ( num != 0); if( n == rev ) { printf(The number is palindrome ); } else { printf( The number is not palindrome ); } return 0 ; }