xxxxxxxxxx
#include <stdio.h>
int isPalindrome(int num) {
int originalNum = num;
int reversedNum = 0;
while (num != 0) {
int remainder = num % 10;
reversedNum = reversedNum * 10 + remainder;
num /= 10;
}
if (originalNum == reversedNum) {
return 1; // Palindrome
} else {
return 0; // Not a Palindrome
}
}
int main() {
int number;
printf("Enter a number: ");
scanf("%d", &number);
if (isPalindrome(number)) {
printf("%d is a palindrome number.\n", number);
} else {
printf("%d is not a palindrome number.\n", number);
}
return 0;
}